God had cut two stone tablets, upon which He had written the Ten Commandments, and He gave them to Moses (Ex. 31:18). Upon Moses' return to his brethren at the foot of Mount Sinai, seeing their idolatry (Ex. 32:8) and debauchery (Ex. 32:6 w/25), he cast down the stone tablets and shattered them (Ex. 32:19). In a way, Moses was guilty of sinning, in that he "broke the law" (pun intended).
And what was God's reaction? In the next chapter (Ex. 33), God promised to honor the covenant He had made with Abraham, Isaac, and Jacob, and He appears to the people as a "cloudy pillar." We read in Nehamiah 9:12 that the "cloudy pillar" was evidence of God's presence during the day, and that He was seen by night as being in a "pillar of fire." Then in the chapter after that (Ex. 34), God made Moses replace the stone tablets, and He wrote the Ten Commandments a second time (Ex. 34:1-4 w/28).
As evidence that God accepted the "second copy" of the Ten Commandments, He had Moses place them into the Ark of the Covenant, along with Aaron's rod that budded and a golden jar of manna (Heb. 9:1-4). When the Ark of the Covenant was placed in the Temple, it contained only the stone tablets; somewhere along the line, the other two items had be removed (1 Kgs. 8:9). In my opinion, that symbolizes the fact that Aaron's role and the provision of manna had been temporary, but that the Law of God was to be a lasting testimony of God's servant Moses, and his role in delivering the Law to Israel .
Because we all break God's Commandments, God provided His Son, the Lord Jesus Christ, to pay for our sins, and offer us a second chance on life - a "second birth" (Jn. 3:3-8)!