Even when a harsh judgment is declared, the door to change remains firmly open. When God decrees death for a wicked person, that individual still holds the opportunity to repent, abandon their bad deeds, and begin doing good [מצודת דוד]. The process of repair starts with completely leaving the sin behind and making a firm commitment never to repeat it from that point forward [מצודת דוד].
Completing this process of repentance requires two distinct actions that cover the entirety of human obligation: acting with justice and practicing righteousness [מלבי״ם]. Acting with justice focuses on the responsibilities between people. It demands that a person actively fix past wrongs. For example, if someone stole an object, they must return it, or pay its financial value if the original item can no longer be given back.
Practicing righteousness, in contrast, deals with the relationship between a person and God. It involves following the laws of the Torah, which grant eternal life in the World to Come, while taking strict care to avoid committing future wrongs. By combining these two elements, repairing relationships with society and keeping God's laws, the individual earns the right to live and avoids the death penalty for past sins [מלבי״ם].