Pro 11:4 Riches do not profit in the day of wrath, but righteousness delivers from death.
To count on good works for salvation is to believe you are rich enough to earn salvation. This is not profitable in the day of judgement. Paul in Romans 3 proves one thing, we are all bankrupt despite the display of what we consider good works before God. “10 as it is written:“None is righteous, no, not one; …12 All have turned aside; together they have become worthless; no one does good, not even one.” (Rom 3:10-12). All our worth, assets are liabilities in terms of righteousness, tainted with sin (transgression of the laws of God).
By nature we are children of wrath destined to hell, “But God, being rich in mercy, because of the great love with which he loved us, even when we were dead in our trespasses, made us alive together with Christ—by grace you have been saved” (Eph 2:4-5).
To be saved, you must declare that you are bankrupt and agree with God that you are wretched sinner in need of a Savior. Repent and believe the gospel. It is by grace through faith in Christ alone who died on the cross and rose again on the 3rd day are we saved.