The Bible teaches that sinful people cannot earn salvation or contribute to their salvation. Justification and eternal life are free gifts of God received by faith alone in Christ alone (Rom 4:1-8, Gal. 2:15-16, Eph 2:8, etc.). Or as the Heidelberg Catechism says, the good we do can’t make us right or help make us right with God because he demands entire perfection, but “even the very best we do in this life is imperfect and stained with sin” (Q 62). However, doesn’t God promise to reward obedience (Mt. 5:12, 10:41-41, Heb. 11:6, etc.)? Geerhardus Vos explained this well:
“That being judged “according to works” also applies to believers is apparent from Matthew 25:34–40; 1 Corinthians 4:5; 2 Corinthians 5:10; Revelation 22:12. However, this is not to be understood in the sense that works provide the basis for the decision whether one has earned or not earned salvation. Works will come into consideration as a manifestation of genuine saving faith. Work in the scriptural sense also means not just an external display but the expression of one’s life that flows out of the depth of the heart. So understood, works are in fact evidences for the presence of faith.
But works occur in yet another sense than as evidences of faith. Scripture also speaks of reward for believers (“their works follow them,” Rev 14:13; Matt 5:12, 16; 6:1; Luke 6:23; Heb 10:34–38). This reward comes as compensation for the cross, as restitution for what was robbed, as recompense for love shown to the servants of the Lord, etc. There will be proportion in this reward (Matt 25:21, 23; Luke 6:38; 19:17, 19; 1 Cor 3:8). It is presented as a reaping that corresponds to what is sown (Gal 6:7–10). Salvation will be perfect for all, but nonetheless not entirely the same for all. This is certain: the difference will not possibly provide any occasion for unhappiness. Accordingly, for believers works are a criterion for the glory to be received. But this is a reward out of grace (Rom 11:35; 1 Cor 4:7; John 3:27). And the bestowing of salvation, as such, will take place solely on the basis of the imputed righteousness of Christ received by faith.
So it’s not as if we receive initial justification by faith and then final justification by faith plus works. Not at all. It’s all of grace. The Heidelberg Catechism summarizes Scripture well when talking about the rewards of obedience: “This reward is not earned; it is a gift of grace” (A 62). Or, as the Apostle says in 1 Corinthians 15:10,
But by the grace of God I am what I am, and his grace to me was not without effect. No, I worked harder than all of them—yet not I, but the grace of God that was with me. [NIV]
[The above quotes by Vos are found in his Reformed Dogmatics, ed. Richard B. Gaffin, trans. Annemie Godbehere et al., vol. 5 (Bellingham, WA: Lexham Press, 2012–2016), 293.]