For you are saved by grace through faith, and this is not from yourselves; it is God’s gift—not from works, so that no one can boast. For we are his workmanship, created in Christ Jesus for good works, which God prepared ahead of time for us to do. (Ephesians 2:8-10 CSB)
Salvation is a free gift. God sent Jesus to bear our sins on the cross, not because of our great qualities or because we’ve been such good people, but because He loves us. While we were still sinners, Christ died for us, and for this reason, we get to rejoice in the free gift of salvation, but it is also our job to actually receive that gift.
From here, God gives us good works to do out of love for Him, not out of necessity for salvation. These works are not for ourselves, but for His glory.