Ezekiel 18:24, says when a righteous man turns away from his righteousness and commits iniquity, all the righteousness he has done will not be remembered. So, if a born-again believer commits adultery and divorces their spouse, will all the righteousness done during the marriage (ie. tithes, helping the widows and orphans, charitable donations) be forgotten, and all the heavenly rewards built up to the point of these major iniquities be wiped out? If the person repents from these life-damaging iniquities, could the heavenly rewards be restored?
You’re confusing the Old Covenant, which is works based, with the New Covenant which is solely by faith. A born again believer’s righteousness is imputed to him by faith, not by works (Romans 3:21-22) All the sins of our life were forgiven at the cross before we committed even one of them (Colossians 2:13-14). When we are born again we become a new creation in God’s sight, as righteous as He is (2 Cor. 5:17, 21).
Tithes, helping widows and orphans, and charitable donations do not create righteousness, nor does the absence of these things make us unrighteous. If our works are done in the Lord’s will and motivated by gratitude for what He’s given us they are considered good and can earn us rewards, but apart from this we can do nothing of value to the Kingdom (John 15:5) no matter how good our works appear to be.