The problem you have here is that Jesus was only sent to the Jews.
Lot's of folk have an issue with this and especially traditional church folk.
Matthew 15:24
But He answered and said, “I was sent only to the lost sheep of the house of Israel.”
This means that the law is embedded within the words that Jesus speaks.
The law does not generate righteousness so the law is a poor master to have.
The Spirit leads ands teaches us all things in the New Testament and not the law.
The law was temporary and useless and and only delivers a knowledge of sin.
Galatians 5:16-18
But I say, walk by the Spirit, and you will not carry out the desire of the flesh. For the flesh
sets its desire against the Spirit, and the Spirit against the flesh; for these are in opposition
to one another, so that you may not do the things that you please. But if you are led by the Spirit,
you are not under the Law.
Jesus was sent to fulfill the Jewish OT law for the potential salvation of both Jews and Gentiles.
The HS leads and teaches (enables and motivates) J&G Christians/believers to cooperate with God's moral will.
Knowledge of sin is not useless but rather leads sinners to repent, accept Jesus as Messiah and walk in the HS.
TOP #18: Those who ignore God’s urging of repentance will reap divine wrath on the day of judgment. [Rom. 2:3-5] God’s kindness or patience with sinners is meant to lead them toward repentance, which implies that sinners are able to repent because of God’s leading, and those who do not repent but instead stubbornly resist God’s leading are storing up wrath against themselves.
TOP #25: All have sinned by breaking moral law but may be justified by God’s grace through faith in Christ’s redemption or atonement. [Rom. 3:9-26] Verse 21 states that “the Law and Prophets testify” or prepare the way for the new revelation of righteousness from God apart from the Law, which takes up where Romans 1:17 left off. Verse 22a says that “righteousness from God” or s/e comes through faith “in Jesus Christ” (cf. Eph. 2:8), a phrase Paul used eleven times in Ephesians 1:3-14 to indicate s/e. Verse 22b says that God’s righteousness is given “to all who believe—there is no difference”” signifying that all sinners may believe or be s/e (cf. 1Tim. 2:3-4, John 3:16, Tit. 2:11), because there is no favoritism (#22).
TOP #37: The law served to convict souls of sin, but the Spirit frees them from condemnation. [Rom. 7:7-8:8] Paul describes s/e in terms of struggle between what a person’s conscience wants to do and what his sinful nature causes him to do until he is rescued by Christ. Such release was made possible by the sin offering of Jesus (8:3).
TOP #131: Do not pervert the Gospel of Christ by reverting to belief that salvation is earned via observing the law. [Gal. 1:6-9, 5:1-12] Such doctrine is anathema or condemned (1Cor. 16:22). The purpose of the law of Moses was to lead people to faith in Christ (Gal. 3:22-24). This truth is akin to TOP #37.