Why then the law? It was added because of transgressions, until the offspring would come to whom the promise had been made; and it was ordained through angels by a mediator.
References for Galatians 3:19
Now a mediator involves more than one party; but God is one.
Is the law then opposed to the promises of God? Certainly not! For if a law had been given that could make alive, then righteousness would indeed come through the law.
But the scripture has imprisoned all things under the power of sin, so that what was promised through faith in Jesus Christ might be given to those who believe.
References for Galatians 3:22
Now before faith came, we were imprisoned and guarded under the law until faith would be revealed.
Therefore the law was our disciplinarian until Christ came, so that we might be justified by faith.
But now that faith has come, we are no longer subject to a disciplinarian,