Why, after a stubborn war with Medina, Mecca surrendered to Muhammad without a fight and he did not execute anyone there?

The rulers of Mecca were against Muhammad, while they considered him a troublemaker and a robber. As soon as it became clear that Muhammad was creating his own strong state in Arabia and would encourage trade, the Meccans agreed to enter this state.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.