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
The only thing you can do to be saved is to believe there is nothing you can do to be saved other than cast yourself on the mercy of God.