The whole thing is meant as a covenant: you guys do these things for me & I will do these other things for you. The place where the Bible actually mentions the 10 Commandments seems to be
Exodus 34
It also mentions the Commandments in Exodus 20:
https://www.biblegateway.com/passage/?search=Exodus+20&version=KJV
However, Exodus 34 gives the impression of being a retelling of the same event as what is told in Exodus 20. As such, I can see how it could seem reasonable to suppose that what is being told in Exodus 20 is also "The 10 Commandments" but it still begs the question of why Exodus 34 makes the point of saying that it is a passage about "The Ten Commandments" and Exodus 20 does not make the same point.
It also begs the question of why, despite some overlap (keep the Sabbath, jealous God...), they are clearly different.
I can see why Exodus 20 might be preferable as it is a more clearly delineated list whereas with Exodus 34 you might ask yourself, more than once, "is that one commandment or several?" or "isn't that part of a previous one?" or "are these festival ones all one commandment or should they be counted as separate?" (and, of course, you have to make it all add up to 10). On the other hand, 34 is the passage that makes the point of being the 10 Commandments and Exodus 20 is not.
It's things like that that make me extremely skeptical of various claims about how, aside from its often claimed value as being the "inspired word of God", the Bible can also be appreciated as great literature. Some of it is of very little relevance outside its context of an oral tradition from goat herders (ie. Song of Songs). Some of it is OK reads (Gospels) & some of it is kind of fun (The Revelation of St. John the Divine). But some of it will make your eyes glaze over as well and is virtually unreadable.
If this is the "word of God", God is not very clear and God can be kind of a boring read.