The Letter to the Galatians has a long discussion about the role of the law. This was necessary, because the Christians in Galatia were falling back into legalism. Paul explains why the law was needed in the period between the Exodus and Jesus ministry (Gal 3:19).
The law was put into effect by angels.This means that those who knock the law are putting down the work of angels.
The law was given through angels (Gal 3:20).
Paul explains that the law is not opposed to the promise of salvation through Jesus, because it was not capable of imparting life.
Is the law, therefore, opposed to the promises of God? Absolutely not! For if a law had been given that could impart life, then righteousness would certainly have come by the law (Gal 3:21).The law could not provide full salvation, because no law can do that. Full salvation could only come with Jesus.
In most English translations the last part of Galatians 3 sounds like the people were prisoners of the law. This is bad translation by people who do not understand the purpose of the law. Paul is actually explaining to the Galatians that the law provided spiritual protection for the children of Israel. The Greek word “phroureo” in verse 23 is usually translated as “imprisoned”. This is misleading. The core meaning of the word refers to a garrison. It also refers to a sentinel looking for trouble in the distance. In Phil 4:7 and 1 Peter 4:7, it is translated to mean “kept safe”. This is Paul’s meaning in Galations. The law was not a prison in which the people were locked up. It is a garrison, which keeps the people free from spiritual attack.
As described above, the law provided the people with Israel with spiritual protection from the spiritual powers that dominated the surrounding nations.
Now before faith came, we were guarded/kept safe together under the law until the coming faith would be revealed (Gal 3:23).The law offered protection for the people of Israel until Jesus came. It did not lock people up. It actually guarded them, so they could live in relative freedom until the coming of Jesus and the gift of the Spirit would provide full protection and freedom.
This spiritual protection was not limited to the Jews.
The Torah embraced everyone under sin, until the announcement of faith through Jesus could be given to those who believe (Gal 3:22).Anyone who chose to serve God and reject evil could have the same protection.