And Abram believed the LORD, and the LORD counted him as righteous because of his faith. (Genesis 15:6 NLT)
After God showed Abram the stars and promised that his descendants would be as numerous as the stars, Abram believed God. After Abram believed God’s promise, God considered Abram righteous. Righteousness is a gift from God.
Psalms 24:5 NKJV He shall receive blessing from the LORD, And righteousness from the God of his salvation.
The righteousness that we receive from God is not based on our good works but on our willingness to rely on God’s deeds for us. We do not earn righteousness – it is a gift. Same as with salvation in Romans 6:23
If his good deeds had made him acceptable to God, He would have had something to boast about. But that was not God’s way. For the Scriptures tell us, “Abraham believed God, and God counted him as righteous because of his faith.” When people work, their wages are not a gift, but something they have earned. But people are counted as righteous, not because of their work, but because of their faith in God who forgives sinners. (Romans 4:2-5 NLT)