Well if gal5:18 only refers to Torah, not the moral law, that's no problem is it, that law could be faultlessly obeyed
The law being referred to in Galatians 5:18 is the law of Moses.
That is the context.
The works of the law refers to the law of Moses.
Paul warned these people not to be influenced by those Jews who came there to preach another Gospel, which required them to take up the law of Moses.
Stand fast therefore in the liberty by which Christ has made us free,and do not be entangled again with a yoke of bondage. 2 Indeed I, Paul, say to you that
if you become circumcised, Christ will profit you nothing. 3 And I testify again to every man who becomes circumcised that he is
a debtor to keep the whole law. 4 You have become estranged from Christ,
you who attempt to be justified by law; you have fallen from grace. 5 For we through the Spirit eagerly wait for the hope of righteousness by faith. 6 For in Christ Jesus neither
circumcision nor uncircumcision avails anything, but faith working through love.
7 You ran well. Who hindered you from obeying the truth? 8 This persuasion does not
come from Him who calls you. 9 A little leaven leavens the whole lump. 10 I have confidence in you, in the Lord, that you will have no other mind; but he who troubles you shall bear his judgment, whoever he is.
11 And I, brethren, if I still preach circumcision, why do I still suffer persecution? Then the offense of the cross has ceased. 12 I could wish that those who trouble you would even cut themselves off!
13 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. 14
For all the law is fulfilled in one word,
even in this: “You shall love your neighbor as yourself.” 15 But if you bite and devour one another, beware lest you be consumed by one another!
16 I say then: Walk in the Spirit, and you shall not fulfill the lust of the flesh. 17 For the flesh lusts against the Spirit, and the Spirit against the flesh; and these are contrary to one another, so that you do not do the things that you wish. 18 But if you are led by the Spirit, you are not under the law.
Galatians 5:1-18
The law is a reference to the law of Moses, which includes circumcision.
JLB