In considering the law of God in relation to salvation this analogy may be helpful.
A man with telescoping fractures in his legs is incapable of walking. Any attempt to walk will bring tremendous pain and greater injury. Ignorant people may tell him either to simply numb the pain or even worse: “Normal, healthy people walk. So if you want to be healthy get up and walk!”
It is true that healthy people walk, but the man is a fool to try it. He needs a doctor who can set his bones, heal his wounds, strengthen him, and encourage him as he is healing. There will come a day when he can tentatively stand and take a few steps. Over time he becomes able to walk after a fashion, but always with the helps the doctor gives him and he always has a pronounced limp in his gait. The doctor tells him one day he will perform the final surgery removing all traces of the injuries. Until then he needs to faithfully follow the orders of the doctor on what to eat and how to walk daily. If he does not do what the doctor says his legs will atrophy and he will be unable to accomplish anything and show himself unfit for the surgery.
Attempting to follow the commands of God in order to be saved is like trying to walk on shattered legs. Failing to be obedient to God after salvation cripples our ability to serve in the kingdom. The law of God, properly understood, is our regimen to guide us in kingdom work and strengthen our faith while we wait for our final operation.