You seems you ignore Islam history
there was war between Muslims and Non-Muslims , so Muslim were in defense most of time , they Muslims decide to take Mecca by order of God , Mecca surrender without war .
No, the war between Muslims and Meccans was not in self defence.
The war began when Muhammad provoked the first armed conflict, prior to the battle of Badr in 624, because of Muhammad leading bandit raids against merchant caravans (623 - 624).
Raiding Meccan merchant trade is not the act of self defence, but that of act of aggression, that eventually led to a battle.
And it wasn't self defence in 629, when Muslims attacked Byzantines, in the battle of Mu'tah. Byzantines were the ones defending their territory here, because the Arab Ghasanids were Byzantine ally in Heraclius' war against the Sassanid Persians (602 - 629), were living in Byzantine province.
After Muhammad's death, the Muslims invaded Byzantine Syria in 634, in retaliation for Muslims defeat at Mu'tah, again, not an act of self defence. Muslims then invaded Egypt in 639, also part of Byzantine empire.
Between 633 and 651, Muslims invaded Mesopotamia and then Persia. Again it wasn't self defence.
In 674 - 678, Constantinople was under siege, but the Muslim army was unsuccessful here, because of better fortification and a strong Byzantine navy. The siege was self defence.
And it was self defence when Muslims invaded Spain in 711 - 713.
The whole defensive wars were nothing more than propaganda and a myth that Muslims like to use as excuse to attacking the other sides.