Society makes laws for the good of all (eg the road rules)
God gives humankind laws for the good of all too.
The problem comes, though, when we think we gain God’s favour by our keeping of these laws. That was the Pharisees’ problem. They were self-righteous.
But Jesus teaching – especially in his Sermon on the Mount – shows us that none of us keeps the law. And the consequence is that we are all under the curse of the law (Gal 3:10-11).
But the good news is that Jesus sets us free from the curse of the law (Gal 3:13)
Matthew 5:17-22, 27-28