Sa'id b. Jubair reported: I asked Ibn 'Umar (Allah be pleased with them) about invoking curse (li'an), and he narrated Similarly from Allah's Apostle ﷺ.
Furthermore, this hadith also teaches us an important lesson about patience and trust in Allah's plan for our lives; even if something bad happens to us or someone wrongs us, we must remain patient and trust that Allah will take care of it in His own way without our interference through cursing or other means. We must remember that whatever happens has been decreed by Him so it is best for us to leave it up to Him instead of trying to take matters into our own hands through cursing others or taking revenge ourselves.