Galatians 3:9-22 ESV
So then, those who are of faith are blessed along with Abraham, the man of faith.
For all who rely on works of the law are under a curse; for it is written, “Cursed be everyone who does not abide by all things written in the Book of the Law, and do them.” Now it is evident that no one is justified before God by the law, for “The righteous shall live by faith.” But the law is not of faith, rather “The one who does them shall live by them.” Christ redeemed us from the curse of the law by becoming a curse for us—for it is written, “Cursed is everyone who is hanged on a tree”— so that in Christ Jesus the blessing of Abraham might come to the Gentiles, so that we might receive the promised Spirit through faith.
To give a human example, brothers: even with a man-made covenant, no one annuls it or adds to it once it has been ratified. Now the promises were made to Abraham and to his offspring. It does not say, “And to offsprings,” referring to many, but referring to one, “And to your offspring,” who is Christ. This is what I mean: the law, which came 430 years afterward, does not annul a covenant previously ratified by God, so as to make the promise void. For if the inheritance comes by the law, it no longer comes by promise; but God gave it to Abraham by a promise.
Why then the law? It was added because of transgressions, until the offspring should come to whom the promise had been made, and it was put in place through angels by an intermediary. Now an intermediary implies more than one, but God is one.
Is the law then contrary to the promises of God? Certainly not! For if a law had been given that could give life, then righteousness would indeed be by the law. But the Scripture imprisoned everything under sin, so that the promise by faith in Jesus Christ might be given to those who believe.
ESV: English Standard Version 2016