Narrated 'Aisha: Once the Jews came to the Prophet ﷺ and said, "Death be upon you". So I cursed them. The Prophet ﷺ said, "What is the matter?" I said, "Have you not heard what they said?" The Prophet ﷺ said, "Have you not heard what I replied (to them)? (I said), ('The same is upon you'.)"
The Prophet's response of "the same is upon you" was a way of showing kindness and mercy towards those who cursed him instead of responding with anger or hatred. It teaches us an important lesson about how we should treat others even if they are unkind towards us - by responding with kindness instead of aggression or hostility.