As-Salaam alaikum,

In Sunan Tirmidhi, it is mentioned that Anas Ibn Malik, may Allah be pleased with him, reported that the Messenger of Allah, Sallallahu alaihi Wasallam, said:--

"Indeed, Sadaqah (charity) extinguishes the Lord's anger, and it protects
against evil (bad) death."

If Allah Ta'ala was angry with a servant who did something wrong, and he/she immediately gives a sadaqah, Allah loves that and He takes away His Anger from that servant who does sadaqah. And sadaqah/charity can be in any way: in money to those in need, a smile, in visiting homeless people and feeding them, removing the sorrow of the sorrowful... things like that.

Best Wishes to you all..