“I do not frustrate the grace of God: for if righteousness come by the law, then Christ is dead in vain.” (Galatians 2:21)
Paul wrote this passage to the Galatians in response to false teaching by a group of Jewish Christians. They taught that grace was insufficient and works in accordance with the Law of Moses was required for salvation. As Paul noted “if righteousness come by the law then Christ is dead in vain”, we are sinners and incapable of keeping any law, even if it is as simply put as the 10 commandments. Therefore, if the grace of God depends on adherence to the law, we are all condemned without hope and Christ did die in vain.
Fortunately, that’s not true. We are saved by grace through faith. “I am crucified with Christ: nevertheless I live; yet not I, but Christ liveth in me: and the life which I now live in the flesh I live by the faith of the Son of God, who loved me, and gave himself for me.” (Galatians 2:20) We (our old life, heart and mind) are crucified with Christ when we accept Him. Our old selves no longer exist. Now He lives within us. His grace through our faith in Him and His selfless sacrifice provide the path to heaven and eternal life. Christ’s death was not in vain and he is alive and well today. Let his grace be sufficient for you and shun trying to work your way into heaven.
Good works and obedience to scripture are a wonderful Spirit lead consequence of becoming a born again Christian, not a prerequisite.