Galatians 3:13-14

3:13 Christ redeemed us from the curse of the law by becoming a curse for us (because it is written, “Cursed is everyone who hangs on a tree”) 3:14 in order that in Christ Jesus the blessing of Abraham would come to the Gentiles, so that we could receive the promise of the Spirit by faith.

Galatians 3:22-24

3:22 But the scripture imprisoned everything and everyone under sin so that the promise could be given – because of the faithfulness of Jesus Christ – to those who believe.

Sons of God Are Heirs of Promise

3:23 Now before faith came we were held in custody under the law, being kept as prisoners until the coming faith would be revealed. 3:24 Thus the law had become our guardian until Christ, so that we could be declared righteous by faith.