A law that is the strength of sin is a law that is sinful, however, the Law of God is not sinful, but how we know what sin is (Romans 7:7)
This section in the NKJV for context is titled by the translators "The Law Brings A Curse."
Galatians 3:10-14
10For as many as are of the works of the law are under the curse; for it is written, “Cursed
is everyone who does not continue in all things which are written in the book of the law, to do them.”
11But that no one is justified by the law in the sight of God is evident, for “the just shall live by faith.” 12Yet the law is not of faith, but “the man who does them shall live by them.”
13Christ has redeemed us from the curse of the law, having become a curse for us (for it is written, “Cursed is everyone who hangs on a tree”), 14that the blessing of Abraham might come upon the Gentiles in Christ Jesus, that we might receive the promise of the Spirit through faith.
Romans 7 is relevant, but it is often used without chapters 6 and 8 which bring abundant light on what Paul is really saying, along with the entire book really. Romans is said by many scholars to be the most profound book in the NT, but when quoting single verses it can easily be used to teach opposite of what it is saying.
For example, if we simply go to the verse preceding 7:7 we gain some context.
Romans 7:6
6But now we have been delivered from the law, having died to what we were held by, so that we should serve in the newness of the Spirit and not in the oldness of the letter.
Not to mention the verses that follow it which explain why we are "delivered
from the law."
Romans 8-12
8But sin, taking opportunity by the commandment, produced in me all manner of evil desire. For apart from the law sin was dead. 9I was alive once without the law, but when the commandment came, sin revived and I died.
10And the commandment, which was to bring life, I found to bring death. 11For sin, taking occasion by the commandment, deceived me, and by it killed
me. 12Therefore the law
is holy, and the commandment holy and just and good.
So yes, the law is holy and good and just, just like it says, but it does not mean we are still bound to the law. Only when one pulls verses out of context rather than reading entire books and chapters do they believe they are somehow still attached to the law. Being under the law produces sin, like Romans 7:10 says.
Paul being used by God explains how this is possible, that something good can be producing death in us in verse 13...
Romans 7:13
13Has then what is good become death to me? Certainly not! But sin, that it might appear sin, was producing death in me through what is good, so that sin through the commandment might become exceedingly sinful.
Lastly, Paul wraps this all up in the context of Romans 7:6 to explain more deeply why we are separated from the law and ends by thanking God for delivering us from it in our "bodies of death" by being under Christ instead of the law.
Romans 7:14-24
14For we know that the law is spiritual, but I am carnal, sold under sin. 15For what I am doing, I do not understand. For what I will to do, that I do not practice; but what I hate, that I do.
16If, then, I do what I will not to do, I agree with the law that it is good. 17But now, it is no longer I who do it, but sin that dwells in me. 18For I know that in me (that is, in my flesh) nothing good dwells; for to will is present with me, but
how to perform what is good I do not find.
19For the good that I will
to do, I do not do; but the evil I will not
to do, that I practice.
20Now if I do what I will not
to do, it is no longer I who do it, but sin that dwells in me.
21I find then a law, that evil is present with me, the one who wills to do good.
22For I delight in the law of God according to the inward man.
23But I see another law in my members, warring against the law of my mind, and bringing me into captivity to the law of sin which is in my members.
24O wretched man that I am! Who will deliver me from this body of death? 25I thank God—through Jesus Christ our Lord!
Now... Paul headed this off at the very beginning of the chapter by explaining how exactly we are separated from the law so that we can be connected to Christ... The verses preceding 7:6 explain exactly how this works, not just declaring what has happened through Christ.
Romans 7:1-5
1Or do you not know, brethren (for I speak to those who know the law), that the law has dominion over a man as long as he lives?
2For the woman who has a husband is bound by the law to
her husband as long as he lives. But if the husband dies, she is released from the law of
her husband.
3So then if, while her husband lives, she marries another man, she will be called an adulteress; but if her husband dies, she is free from that law, so that she is no adulteress, though she has married another man. 4Therefore, my brethren, you also have become dead to the law through the body of Christ, that you may be married to another—to Him who was raised from the dead, that we should bear fruit to God. 5For when we were in the flesh, the sinful passions which were aroused by the law were at work in our members to bear fruit to death.
Yes, the law is good, but that does not mean that it does not produce sin in us. Pulling verse 7 out of context in Romans chapter 7 does not mean that we are under the law or that the law being good means we are still under it.
Romans 8 goes further into this and doubles down on the declaration of being freed from the law.
Romans 8:1-3
1There is therefore now no condemnation to those who are in Christ Jesus, who do not walk according to the flesh, but according to the Spirit.
2For the law of the Spirit of life in Christ Jesus has made me free from the law of sin and death. 3For what the law could not do in that it was weak through the flesh, God
did by sending His own Son in the likeness of sinful flesh, on account of sin: He condemned sin in the flesh,
Romans 6 also clarifies this whole situation...
Romans 6:15
15What then? Shall we sin because we are not under law but under grace? Certainly not!
Romans 6:18
18And having been set free from sin, you became slaves of righteousness.
Romans 6:22
22But now having been set free from sin, and having become slaves of God, you have your fruit to holiness, and the end, everlasting life.
No one is saying the law is bad, but we are not under it, and being under it brings a curse on us because we cannot live it out properly. Only Christ could do that and He alone lived by the law and died for us to take us from under the curse of the law.
Finally, the ultimate purpose of the law was to show us we are unable to follow God's ways without following Him directly, that is, being in and under Christ rather than being under the law. We are not able to get free of our sin without God's help, and without God's help we can do nothing (John 15:5). We are under the law of love in Christ now, not under the law of the letter (2 Corinthians 3:6).
The purpose of the law is to form us into the image of Christ who is the love of God revealed to us all and who we are meant to become like. In other words, God wants us to serve Him in His love, with His love in us, and to others through His love (John 3:16-17) (Matthew 22:37-40).
1 Timothy 1:5
Now the purpose of the commandment is love from a pure heart,
from a good conscience, and
from sincere faith,
Anyone who puts themselves under the law is cursed as Galatians 3 says clearly, cannot please God, will never keep the law, and will be permanently unable to ever stop sinning because they cannot do that until they are dead to the law and under and in the grace of Jesus Christ.
We are meant to exceed the letter of the law by the law of God's love. His love in us tells us not only to not lie to our neighbor, but to go above and beyond to show them God's love and do far more than the letter of the law ever commanded.
When we are connected to God and His Spirit lives in us then He compels us in our heart to do the things that please Him, rather than things that please us and we serve Him out of love for Him, not for fear of a curse that is no longer over us.