I theory there are two ways to righteousness. I say theory because the 1st is impossible, that is under the law (Old Testament) to live a perfect sinless life. Secondly and more practical, you can have Christ live your life for you and no longer be under the law.
Paul in his letter to the church at Galatia says in Chapter 2:
19 For I through the law am dead to the law, that I might live unto God.
21 I do not frustrate the grace of God: for if righteousness come by the law, then Christ is dead in vain.
The question is what life are you living today?