If God had saved the Israelites out of bondage in Egypt in order to put them under bondage to His law, then it would be for bondage that God sets us free, however Galatians 5:1 says that it is for freedom that God sets us free, so you are not correctly identifying what Paul was speaking against. In Psalm 119:142, the Law of God is truth, and in John 8:31-36, it is the transgression of the Law of God that puts us into bondage while the truth sets us free.Zero misunderstanding! God is speaking through His apostles:
*-"Stand fast therefore in the liberty by which Christ has made us free, and do not be entangled again with a yoke of bondage. You have become estranged from Christ, you who attempt to be justified by law; you have fallen from grace."
Galatians 5:1, 4 NKJV
God wanted His children to repent and to return to obedience to His law all throughout the Bible, and even Christ began his ministry with that Gospel message (Matthew 4:15-23), so it would be absurd to interpret Galatians 5:4 as Paul warning against obeying God and saying that we will be cut off from Christ if we repent and believe the Gospel of Christ. In Psalm 119:29-30, he wanted to put false ways far from him, for God to be gracious to him by teaching him to obey His law, and he chose the way of faith by setting it before him, so this has always been the one and only way of salvation by grace through faith, and it would again be absurd to interpret this as if he wanted God to be gracious to him by teaching him how to fall from grace. If you think that Paul warned us against obeying God and God therefore warned us against obeying Paul, then you should follow God instead of Paul, but the reality is that Paul was a servant of God who therefore never spoke against obeying anything that He has spoken.
Everything in the Law of Moses is either in regard to how to love God or how to love our neighbor, which is why love fulfills the law and why Jesus said in Matthew 22:36-40 that those are the greatest two commandments and that all of the other commandments hang on them, so the positions hat we should obey the greatest two commandments is also the position that we should obey rest of the Mosaic Law.-"For you, brethren, have been called to liberty; only do not use liberty as an opportunity for the flesh, but through love serve one another. For all the law is fulfilled in one word, even in this: "You shall love your neighbor as yourself.""
Galatians 5:13-14 NKJV
-"For all the law is fulfilled in one word, even in this: "You shall love your neighbor as yourself.""
Galatians 5:14 NKJV
In Galatians 5:16-23, Paul contrasted the desires of the flesh with the desires of the Spirit and everything that he listed as works of the flesh that are against the Spirit are also against the Mosaic Law while all of the fruits of the Spirit are aspects of God's character traits that the Mosaic Law was given in oder to teach us how to embody. The desires of the flesh causing us not to do the good that we want to do is how Paul described his struggle with the law of sin in Romans 7, which is the law of sin that the Law of the Spirit of Life has freed us from (Romans 8:2), so that is the law that we are not under when we are led by the Spirit. The Law of Moses was given by God and the Spirit is God, so it would be contradictory to interpret Galatians 5:18 as referring to the Law of Moses as if we are not led by God when we are led by God.*-"But if you are led by the Spirit, you are not under the law."
Galatians 5:18 NKJV
If Paul had been speaking against circumcision for any reason and not just against incorrect reasons, then Galatians 5:2 would mean that he caused Christ to be of no value to Timothy when he had him circumcised and Christ is of no value to roughly 70% of the men in the US. In Acts 15:1, men from Judea were wanting to require Gentiles to become circumcised in order to become saved, however, that was never the reason why God commanded circumcision, so the Jerusalem Council upheld the Mosaic Law by correctly ruling against requiring circumcision for an incorrect reason. In Exodus 12:48, Gentiles who wanted to eat of the Passover lamb are required to become circumcised, so the Jerusalem Council should not be interpreted a ruling against Gentiles correctly obeying what God has commanded as if they had the authority to countermand God. However, if you still think that the Jerusalem Council ruled against obeying what God has commanded, then the bottom line is that we must obey God rather than man, so we should be quicker to disregard everything that any man has said than to disregard anything that God has commanded.-"As many as desire to make a good showing in the flesh, these would compel you to be circumcised, only that they may not suffer persecution for the cross of Christ. For not even those who are circumcised keep the law, but they desire to have you circumcised that they may boast in your flesh. For in Christ Jesus neither circumcision nor uncircumcision avails anything, but a new creation."
Galatians 6:12-13, 15 NKJV