For by grace ye are saved through faith; and that not of yourselves: it is the gift of God: Not of works let any man should boast. Ephesians 2:8-9
There is nothing that man can do to earn salvation, it is a gift from God. Good works during your life do not bring salvation, only faith in Jesus Christ does that. We are saved for good works, not by good works. Read Galatians 2:16