Many make the mistake of regarding the Law as what governed the Old Covenant. The Law was the covenant (Exodus 34:28; Deuteronomy 4:13; 9:9, 11, 15, Hebrews 9:4).
It is also regrettable that the Ten Commandments are misunderstood in terms of a legal code imposed on people, threatening sanctions and penalties for disobedience. Such a concept misses God's intention. Israel's violation of the Law was not regarded as criminal but as betrayal. In other words, God regarded Israel's breaking of the Law as unfaithfulness--as adultery (Ezekiel 23:37).
Israel violated the covenant soon after it was given (Exodus 32), however, in anticipation of their sin, God gave instructions concerning the tabernacle, the priesthood, and the ritual system (24:12-31:18) to provide for Israel's failures. These things became types and shadows of God's ultimate to bring in salvation through His Son, Jesus Christ.
Jesus did what Israel, as covenant son, could not do. Jesus fulfilled the Law (Matthew 5:17-20), not by obeying it but as being the One that the Law prescribed. The Law finds its ultimate reference in Jesus, the perfect the Man. Thus, all believers who are "in Christ" are also "in-lawed" to Christ (1 Corinthians 9:21).
When Paul states that we are "not under the law" (Galatians 5:18), he does not mean that we can do whatever we please, but that we are under Christ as our Covenant Head. He is our law (John 14:15) through Spirit enabled submission and obedience (see Galatians 5).
Exodus records the giving of the covenant on the mountain. God spoke to the people directly from heaven (20:22) while the people stood far off. This display of God's holiness was awful and terrifying, so the people plead for Moses to mediate the covenant with God. The people agreed and pledged their obedience (24:3). The next day Moses built an altar and offered burnt offerings (for sin), which were the typical offerings of worship (24:5).
He also sacrificed peace offerings because, at that point, Israel was without guilt, established as the covenant son in fellowship with Yahweh. With everything right, Moses read the covenant. The people reaffirmed their commitment to it and Moses sprinkled the blood on the altar and the people, sealing the covenant (24:6-8). It was on these terms and in this condition that Moses, the future priests, and the elders, representing the covenant son, went onto the mountain, saw God, and ate a covenant meal (24:9, 10).
All this pointed to Jesus Christ, the true Israel. This is what we celebrate at the Lord's Table, for it is Jesus' blood that confirmed the New Covenant for the many (Hebrews 13:20; Matthew 26:28). He is truly everything that God ordained for His covenant people (Isaiah 2:1-5). Now the Law now finds its abiding role in the life of the believer in obedience to Jesus (John 14:15).