For by works of the law no human being will be justified in his sight, since through the law comes knowledge of sin.
No one has ever been saved by their works. No one has ever been saved by their own goodness or performance. Every person who has ever been saved has been saved in the same way: by the initiating grace of God through our responsive faith in God.
In the Old Testament, salvation was based on a promised Savior. That is, the blood of the animal sacrifices could never really atone for sin. They were simply a temporary covering until one day the Lamb of God died in our place on a cross and paid for sin.
Before the cross people were saved by God’s grace through faith. Through faith in a coming Savior. After the cross people were saved by God’s grace through faith. Through faith in a Savior who came.
Abraham is the greatest example. As Genesis 15:6 states, and as Paul underscores in Romans 4, Abraham was justified by his faith, not by his performance. That is the same way that you and I are justified, by the grace of God through faith in a Savior, not by our performance.
So, in light of all of this, what exactly was the purpose of the law in the Old Testament? The law was never given to save us. Rather, the law was given to show us our sin and hence point us to our need for a Savior. Romans 3:20 is a central passage on the purpose of the law: “For by works of the law no human being will be justified in his sight, since through the law comes knowledge of sin.”
So the law does not bring the forgiveness of sin, but the knowledge of sin. The law helps us to realize how sinful we are and hence our need for a Savior.
Martin Luther stated it classically:
The principal point … of the law … is to make men not better but worse; that is to say, it sheweth unto them their sin, that by the knowledge thereof they may be humbled, terrified, bruised and broken, and by this means may be driven to seek grace, and so come to that blessed Seed [sc. Christ].
Thank you so much that we can trust a Savior and not our own performance to get into heaven.