Rom 10:5, Lev 18:5, Deut 32:46-47, Rom 3:20-22, Gal 3:22-24, Rom 10:4, Rom 10:9-10, Rom 1:17
The purpose of the law is that we live by doing righteousness. (Rom 10:5, Lev 18:5, Deut 32:46-47)
Rom 10:5 For Moses describeth the righteousness which is of the law, That the man which doeth those things shall live by them.
Lev 18:5 Ye shall therefore keep my statutes, and my judgments: which if a man do, he shall live in them: I am the Lord.
Deut 32:46 And he said unto them, Set your hearts unto all the words which I testify among you this day, which ye shall command your children to observe to do, all the words of this law. 47 For it is not a vain thing for you; because it is your life: and through this thing ye shall prolong your days in the land, whither ye go over Jordan to possess it.
But there is no body to be justified by works of the law. In the end, the law convinces us of sin and leads us to Christ, the righteousness of God other than the law. (Rom 3:20-22, Gal 3:22-24)
Rom 3:20 Therefore by the deeds of the law there shall no flesh be justified in his sight: for by the law is the knowledge of sin. 21 But now the righteousness of God without the law is manifested, being witnessed by the law and the prophets; 22 Even the righteousness of God which is by faith of Jesus Christ unto all and upon all them that believe: for there is no difference:
Gal 3:22 But the scripture hath concluded all under sin, that the promise by faith of Jesus Christ might be given to them that believe.
23 But before faith came, we were kept under the law, shut up unto the faith which should afterwards be revealed.
24 Wherefore the law was our schoolmaster to bring us unto Christ, that we might be justified by faith.
Christ fulfilled the purpose of the law, righteousness. God forgave all our sins by Jesus dying on the cross for us. We are made righteous by believing that Jesus is the Christ. (Rom 10:4, Rom 10:9-10, Rom 1:17)
Rom 10:4 For Christ is the end of the law for righteousness to every one that believeth.
Rom 10:9 That if thou shalt confess with thy mouth the Lord Jesus, and shalt believe in thine heart that God hath raised him from the dead, thou shalt be saved. 10 For with the heart man believeth unto righteousness; and with the mouth confession is made unto salvation.
Rom 1:17 For therein is the righteousness of God revealed from faith to faith: as it is written, The just shall live by faith.