Romans 3:20-21 says: “For no one can ever be made right with God by doing what the law commands. The law simply shows us how sinful we are. But now God has shown us a way to be made right with him without keeping the requirements of the law, as was promised in the writings of Moses and the prophets long ago.” (NLT)
The law does not make us right with God. It shows us how sinful we are. Jesus made us right with God.