Romans 4:2-5

ISV(i) 2 For if Abraham was justified by actions, he would have had something to boast about—though not before God. 3 For what does the Scripture say? “Abraham believed God, and it was credited to him as righteousness.”
4 Now to someone who works, wages are not considered a gift but an obligation. 5 However, to someone who does not work, but simply believes in the one who justifies the ungodly, his faith is credited as righteousness.