Sorry friend Paul through God is referring to all the Law, including the Ten.
If the Law is in our hearts and minds and we are changed, then the written Law in the Book of the Law which has the Ten in it is not our tutor anymore bercause that which was within it is within us. This is how Galatians must be understood. Paul is clear in chapter three when he through God speaks of the Law being our schoolmaster and in that He mentions the Book of the Law OUTRIGHT in respect to this (see verse 10). And that it was only to brings us unto Christ. For we whom have been baptized into Christ have put on Christ and now therefore live by the Faith of the Son of God who gave Himself for us. Through Him the word is in our hearts and mouths. This the faith in which we preach and that we the just live by and establishes the Law that was written in the Book.
Law is a generic term, there are lots of laws in scripture and the context will tell us which law is being referred to and Paul states the law he is referring explicitly....
Lets take a look
The Jews were trying to make the Gentile convert be circumcised in order to receive the gospel and to be saved. This is the law Paul is referring to as it clearly states. There is no law of circumcision in the Ten Commandments found in Exodus 20
Gal 2: 3 Yet not even Titus who
was with me, being a Greek,
was compelled to be circumcised. 4 And
this occurred because of false brethren secretly brought in (who came in by stealth to spy out our liberty which we have in Christ Jesus, that they might bring us into bondage), 5 to whom we did not yield submission even for an hour, that the truth of the gospel might continue with you.
6 But from those who seemed to be something—whatever they were, it makes no difference to me; God [
b]shows personal favoritism to no man—for those who seemed
to be something added nothing to me. 7 But on the contrary, when they saw that the gospel for the
uncircumcised had been committed to me, as
the gospel for the
circumcised was to Peter 8 (for He who worked effectively in Peter for the apostleship to the
circumcised also worked effectively in me toward the Gentiles), 9 and when James, [
c]Cephas, and John, who seemed to be pillars, perceived the grace that had been given to me, they gave me and Barnabas the right hand of fellowship, that we
should go to the Gentiles and they to the circumcised. 10
They desired only that we should remember the poor, the very thing which I also was eager to do.
11 Now when [
d]Peter had come to Antioch, I [
e]withstood him to his face, because he was to be blamed; 12 for before certain men came from James, he would eat with the Gentiles; but when they came, he withdrew and separated himself, fearing [
f]those who were of the
circumcision. 13 And the rest of the Jews also played the hypocrite with him, so that even Barnabas was carried away with their hypocrisy.
14 But when I saw that they were not straightforward about the truth of the gospel, I said to Peter before
them all, “If you, being a Jew, live in the manner of Gentiles and not as the Jews, [
g]why do you compel Gentiles to live as [
h]Jews? 15 We
who are Jews by nature, and not sinners of the Gentiles, 16 knowing that a man is not [
i]justified by the works of the law but by faith in Jesus Christ, even we have believed in Christ Jesus, that we might be justified by faith in Christ and not by the works of the law; for by the works of the law no flesh shall be justified.
17 “But if, while we seek to be justified by Christ, we ourselves also are found sinners,
is Christ therefore a minister of sin? Certainly not! 18 For if I build again those things which I destroyed, I make myself a transgressor. 19 For I through the law died to the law that I might live to God. 20 I have been crucified with Christ; it is no longer I who live, but Christ lives in me; and the
life which I now live in the flesh I live by faith in the Son of God, who loved me and gave Himself for me. 21 I do not set aside the grace of God; for if righteousness
comes through the law, then Christ died [
j]in vain.”
No other law is being discussed in this passage except circumcision, so best not to add what's not there.
Paul contrast these laws- circumcision with the commandments of God- so its not all the same law
1 Cor 7:19 Circumcision is nothing and uncircumcision is nothing,
but keeping the commandments of God is what matters.