Galatians 3:21–22
21 Is the law then contrary to the promises of God? Certainly not! For if a law had been given that could give life, then jrighteousness would indeed be by the law. 22 But the Scripture kimprisoned everything under sin, so that the promise by lfaith in Jesus Christ might be given to those who believe.
Galatians 3:24
24 So then, the law was our guardian nuntil Christ came, in order that we might be ojustified by faith.