Exodus 20 records the Ten Commandments, called the ten words in Exodus 34:28. They begin with a preface: I am Yahweh your God, who brought you out of the land of Egypt, out of the house of bondage. This shows the covenant pattern. The King first describes His saving acts, then states His commands. Obedience is a response to grace.
The commands are written on two tablets. The first commands concern loyalty to God alone, no idols, reverence for His name and keeping the Sabbath, which is grounded in God's own rest after six days of creation (20:11). The rest guard human life and relationships: honoring parents, protecting life, marriage, property and truth, and finally the heart itself, since coveting happens inside us. In the New Testament, Jesus taught that the law reaches our thoughts and motives (Matthew 5:21-28).
The people were terrified by the thunder and asked Moses to speak for them. Moses explained that God's purpose was that his fear may be before you, that you won't sin (20:20). Healthy fear of God is reverent awe that guards us from sin. Paul says the law shows us our sin (Romans 3:20), and he also calls it holy, righteous, and good (Romans 7:12). In the New Testament, Jesus says He came not to destroy the law but to fulfill it (Matthew 5:17).