The sages taught that four things cancel an evil decree sealed in Heaven, and they built each proof from Scripture itself.
The first is tzedakah, the righteous gift. "Righteousness delivers from death" (Proverbs 10:2). The second is prayer. "Then they cried to the Lord in their trouble, and He delivered them out of their distresses" (Psalms 107:6). The third is a change of name, which changes the soul that answers to it. When Sarai became Sarah, God said, "I will bless her, and give you a son by her" (Genesis 17:15-16). What had been sterile became fruitful the moment the name shifted.
The fourth is reformation of conduct. When the people of Nineveh turned from their violence, "God saw their works, and God relented of the evil which He had said He would do to them" (Jonah 3:10). The sentence was written, and their change of behavior unwrote it.
Some sages added a fifth: a change of residence. When the Holy One told Abram, "Go forth from your country" (Genesis 12:1), the promise that followed was, "I will make of you a great nation." The old place had held an old fate. The new place held a new one (Rosh Hashanah 16b).
The decree is never the last word. The response to it is.