“For by grace you have been saved through faith. And this is not your own doing; it is the gift of God,
For we are his workmanship, created in Christ Jesus for good works, which God prepared beforehand, that we should walk in them.”
Ephesians 2:8, 10 ESV.
We are not saved by doing good works, but we are saved for the purpose of doing good works: “For we are God’s handiwork, created in Christ Jesus to do good works, which God prepared in advance for us to do.” Good works are a vital part of the Christian life because doing good is one of the reasons God saves us—He has things for us to do. But the sequence is all-important—good works are not the cause of salvation but the purpose of it. God saves us so that we can go into the world, doing good works in His name, and this brings Him all the more glory (cf. Matthew 5:16).
Excerpt from Got Questions