This from my friend, Joel Brueseke, is beautifully clear:
Paul didn't say, "By the law is the knowledge of righteousness." He said, "By the law is the knowledge of sin." (Romans 3:20)
Paul didn't say, "The law was added so that righteousness might increase." He said, "The law was added so that sin might increase." (Romans 5:20)
Paul didn't say, "When the commandment came, righteousness sprang to life and I became alive." He said, "When the commandment came, sin sprang to life and I died." (Romans 7:9).
There's a big difference between what Paul said and what is taught in many churches these days.
I would add that Paul didn’t write, “The power of sin is not knowing the law.” He wrote, “The power of sin is the law.” (1 Corinthians 15:56)
If you're struggling with sin, consider whether you're attempting to live by "straightening yourself up," by keeping good rules and appearances, or by looking to Jesus, who made us free and who makes us His workmanship.