Christ did this in order that the blessing which God promised to Abraham might be given to the Gentiles by means of Christ Jesus, so that through faith we might receive the Spirit promised by God.
My friends, I am going to use an everyday example: when two people agree on a matter and sign an agreement, no one can break it or add anything to it.
Now, God made his promises to Abraham and to his descendant. The scripture does not use the plural "descendants," meaning many people, but the singular "descendant," meaning one person only, namely, Christ.
What I mean is that God made a covenant with Abraham and promised to keep it. The Law, which was given four hundred and thirty years later, cannot break that covenant and cancel God's promise. 1
References for Galatians 3:17
For if God's gift depends on the Law, then it no longer depends on his promise. However, it was because of his promise that God gave that gift to Abraham. 2
References for Galatians 3:18
What, then, was the purpose of the Law? It was added in order to show what wrongdoing is, and it was meant to last until the coming of Abraham's descendant, to whom the promise was made. The Law was handed down by angels, with a man acting as a go-between.
But a go-between is not needed when only one person is involved; and God is one.
References for Galatians 3:20
Does this mean that the Law is against God's promises? No, not at all! For if human beings had received a law that could bring life, then everyone could be put right with God by obeying it.
But the scripture says that the whole world is under the power of sin; and so the gift which is promised on the basis of faith in Jesus Christ is given to those who believe.
But before the time for faith came, the Law kept us all locked up as prisoners until this coming faith should be revealed.
And so the Law was in charge of us until Christ came, in order that we might then be put right with God through faith.