First thing to note is Exodus 20. This is a list that people generally refer to as "the ten commandments." If you think this is what was written on the tablets, keep reading.
Then there's Exodus 24:12. This is where Yahweh starts making the tablets. The timeline is not specific, but he takes like a month or two.
In Exodus 32:9 Yahweh finishes making the tablets. He then immediately tells Moses that he's decided to kill every Jew exodusing Egypt except for him for worshiping another god. Moses talks him into letting him handle it instead.
Exodus 32:19 is where Moses smashes the tablets that Yahweh spent more than month making. What did they actually say? The story has not said yet.
Exodus 32:27 is where Moses has only the people who worshiped the other god killed with swords. Not false god, mind you. In Exodus the other gods are real. At this point, you might be asking, "Isn't killing against one of the ten commandments Yahweh just spent a month down?" No.
Exodus 34 is where the contents of the tablets are revealed for the first time. Moses goes back to get another copy. Although it never said what was written on the first set, Yahweh is very clear that he is dictating an exact copy for Moses to write down.
They are as follows:
- Do not worship any other god, for the LORD, whose name is Jealous, is a jealous God.
- Do not make any idols.
- Celebrate the Festival of Unleavened Bread. For seven days eat bread made without yeast, as I commanded you. Do this at the appointed time in the month of Aviv, for in that month you came out of Egypt.
- The first offspring of every womb belongs to me, including all the firstborn males of your livestock, whether from herd or flock.
- Redeem the firstborn donkey with a lamb, but if you do not redeem it, break its neck. Redeem all your firstborn sons. No one is to appear before me empty-handed.
- Six days you shall labor, but on the seventh day you shall rest; even during the plowing season and harvest, you must rest.
- Celebrate the Festival of Weeks with the firstfruits of the wheat harvest, and the Festival of Ingathering at the turn of the year.
- Three times a year all your men are to appear before the Sovereign LORD, the God of Israel.
- Do not offer the blood of a sacrifice to me along with anything containing yeast and do not let any of the sacrifices from the Passover Festival remain until morning.
- Bring the best of the firstfruits of your soil to the house of the LORD your God. "Do not cook a young goat in its mother's milk."
You might be asking why there are two lists. There aren't. The old testament contains many commandments. The top ten were written on the tablets, and this is it. That other list is just a set that people latched onto. It seems more universal to folks, so they put the title "ten commandments" above it after the fact. The funny thing is, the other list isn't great either, but that's another post.