Righteousness is a gift from God.
Romans 4:11
And he received the sign of circumcision, a seal of the righteousness of the faith which he had yet being uncircumcised: that he might be the father of all them that believe, though they be not circumcised; that righteousness might be imputed unto them also:
Romans 4:22
And therefore it was imputed to him for righteousness.
Romans 5:17
For if by one man's offence death reigned by one; much more they which receive abundance of grace and of the gift of righteousness shall reign in life by one, Jesus Christ.
Romans 5:19
For as by one man's disobedience many were made sinners, so by the obedience of one shall many be made righteous.
These are just a few verses that describe and show that righteousness is something that is imputed to us by God.
Hope this helps.
Amen!
It comes from faith in Christ alone.
Rom 10:9 That if thou shalt confess with thy mouth the Lord Jesus, and shalt believe in thine heart that God hath raised him from the dead, thou shalt be saved.
Rom 10:10
For with the heart man believeth unto righteousness; and with the mouth confession is made unto salvation.
There's absolutely nothing we can DO to get it. God Himself applies the blood of HIS Lamb to the door post of our hearts once we believe and receive His gift of Grace on the cross.
Blessings!