Prophet Muhammad was treated horribly by the people of Ta’if. They threw rocks at him. They threw stones. It’s reported that when he departed: Gabriel came to Prophet Muhammad and said: “O Muhammad! Order what you wish. If you like, I will cause the two mountains to fall upon them.”
The Prophet responded: “No, for I hope that God will make their descendants people who will worship God, and none besides Him.” Prophet Muhammad could have sought revenge. He could have caused them harm like they did to him. But instead, he pardoned them. He prayed for their children.
There’s a lot to learn from the Prophet’s life.