So the Law becomes a curse for us.
If the law were not present our actions would not condemn us, but the law shows we are sinners.
'for without the law sin was dead. For I was alive without the law once, but when the commandment came, sin revived and I died. And the commandment which was ordained to life, I found to be unto death. For sin taking occasion by the commandment, deceived me and by it slew me. Wherefore, the law is holy, and the commandment holy and just and good' (Ro.7:8b-12)
Nothing wrong with the Law, we just can't keep it.
Disobedience demands death, hence the curse of the Law. The Law shows our sin and we cannot keep the law. If you think you can, you are deceiving yourself.
The Law was lead one to grace, not to attempt to try to keep the Law.