Romans says Abraham was counted righteous because he believed God. Paul uses Abraham to show that justification has always rested on faith in God's promise, not on boasting, works, or ethnic boundary markers.
Romans 4 follows Paul's teaching on justification by faith apart from works. Abraham becomes the key example because Scripture says his faith was counted as righteousness before the later sign of circumcision.
This connects the gospel to the larger biblical story. Paul is not inventing a new way of salvation; he is showing how God's promise to Abraham points toward grace received by faith.
A careful reading should not treat Abraham as a generic example of positive thinking. Romans emphasizes trust in the God who gives life and keeps his promise.
Original wording grounded in Romans 4.
3For what does the scripture say? "Abraham believed God, and it was accounted to him for righteousness."