Right after a wrong, do a good deed to erase it. The Prophet ﷺ said: “Fear Allah wherever you are, follow a bad deed with a good one — it will erase it — and treat people with good character.” (Tirmidhī — ḥasan). Allah said: “Indeed, good deeds remove bad deeds.” (Hūd 11:114).

العربية: عن أبي ذر رضي الله عنه قال: قال لي رسول الله ﷺ: «اتّقِ الله حيثما كنت، وأتبِع السيّئة الحسنة تمحُها، وخالِق الناس بخلقٍ حسن». (الترمذي).

Right after a slip, pray, give charity, or make istighfār — a good deed erases the bad.