Rom 7:7, Gal 3:24

The purpose of the law is to convince us of our sin so that we can believe in Jesus as the Christ for the forgiveness of our sins.

1 Tim 1:8 But we know that the law is good, if a man use it lawfully;

Rom 7:7 What shall we say then? Is the law sin? God forbid. Nay, I had not known sin, but by the law: for I had not known lust, except the law had said, Thou shalt not covet.

Gal 3:24 Wherefore the law was our schoolmaster to bring us unto Christ, that we might be justified by faith.