The Law of Moses cannot save you. This is not because the Law is bad, but rather because no one is capable of keeping it. No intellectually honest person can say that they have kept the law of Moses, because that would require that you never tell a lie (Exodus 20:16) , and always loves his neighbor greater than yourself (Leviticus 19:18). Even Moses Himself sinned against God (Numbers 20:12).
Nevertheless, The Old Testament made it clear to the children of Israel that it was possible for them to gain God’s favor, despite the fact that they were all sinners. In order to be forgiven they had to repent of their sins (Ezekiel 33:14-15) and seek atonement. The first 17 chapters of Leviticus explains this in great detail. Here is an excerpt:
“He shall then slaughter the goat for the sin offering for the people and take its blood behind the curtain and do with it as he did with the bull’s blood: He shall sprinkle it on the atonement cover and in front of it. 16 In this way he will make atonement for the Most Holy Place because of the uncleanness and rebellion of the Israelites, whatever their sins have been. He is to do the same for the tent of meeting, which is among them in the midst of their uncleanness.” (Leviticus 16:15-16)
The Torah contains lots of verses like this.
In the New Testament we learn, of course, that the blood of bulls and goats was not enough to cover the children of Israel’s sin. Nevertheless, God forgave them because of their faith. However, the atonement that ultimately covered the sins of the believing Israelites, and all others who believe in the One True God, is the blood of Christ.
This is why the apostle John wrote:
“For the law was given through Moses; grace and truth came through Jesus Christ.” (John 1:18)