"Just as David also speaks of the blessing of the one to whom God counts righteousness apart from works: "Blessed are those whose lawless deeds are forgiven, and whose sins are covered; blessed is the man against whom the Lord will not count his sin"" (Romans 4:6-8).
"Then they said to him, “What must we do, to be doing the works of God?” Jesus answered them, “This is the work of God, that you believe in him whom he has sent”" (John 6:28-29).
"So also faith by itself, if it does not have works, is dead" (James 2:17).
Does "apart from works" mean any work or just certain types? Because faith like Abraham has to be acted on; hence, he believed in God and left to offer Isaac, so in a sense it was a work. I was wondering about your thoughts on when faith is called a work in Luke and James hitting the point faith without works is dead.
In Romans, Paul is discussing how a righteous God can save unrighteous men without compromising on His righteousness. After proving that all are guilty of sin, Paul addresses whether men could earn their salvation. "For if Abraham was justified by works, he has something to boast about, but not before God" (Romans 4:2). If men could earn their salvation, then they would not be saved by grace. "Now to him who works, the wages are not counted as grace but as debt" (Romans 4:5).
But Paul points out that Abraham did not earn his righteousness, God only counted him as righteous because of his faith. "For what does the Scripture say? "Abraham believed God, and it was accounted to him for righteousness"" (Romans 4:3). This doesn't mean that Abraham's faith wasn't an active, working faith, but it does mean he didn't earn his righteousness.
James is addressing a different question: Is it possible to claim to have faith and not do anything at all? James proves that the answer is "no."
The problem most people have is failing to realize that "works" is a general term. You always need to address what kind of work is being discussed. It is never right to lump all works together -- after all there are works of the flesh (Galatians 5:19) and works of God (John 6:29). God created us to do His work. "For we are His workmanship, created in Christ Jesus for good works, which God prepared beforehand that we should walk in them" (Ephesians 2:10).
That is why it is important to note that faith itself is a work. Like any other work, it does not earn us righteousness. God doesn't owe us salvation just because we believe. Rather, God is offering to grant us salvation for this simple task. It is His gift, not His debt.