In the 6th century, the middle east did not have any uniformity in terms of religious following. Most had idol, pegan beliefs.
Prophet Mohammed started preaching Islam across several regions of middle east. Islam as a religion had all ingredients to attract vast following. There was wide spread discrimination during the middle ages in terms of skin colour, in terms of class, in terms of demographics, social status & many other types of segregation.
Islam seemed to overlook all this and had a common pursuit of 1 god, 1 people. Also, it was simplistic and appealed greatly to the people of the region who were combatting with byzantine and zoroastrian ideology.
Also, there was a large vacuum due to the constant incessant fighting between the Byzantine empire and Sassanid empire which gave an opportunity for a new ideology to rise.
After death of prophet Mohammed, Islam rose vividly. Rashidun caliphate under Abu Bakr, Umar & Uthman was the first to spread Islam in the region extending its reach to north Africa and Persia.
Later, Umayyad caliphate extended the reach of Islam in far east regions of Africa and even Europe.
There was slight impact due to the sunni – shites bifurcation and internal civil wars, which led to fall of the caliphate and rise of another Islamic Caliphate (Abbasid).
Subsequently, the capital Baghdad was sacked by Mongolian army in 1258 who were extremely well equipped in fighting tactics and horse riding.
This led to fall of Abbasid caliphate and gave rise to Shite caliphate in Egypt and Yemen named Fatimid caliphate.
The middle east kept on changing hands from Ghaznavids to Ghurid to Seljuk empire all propagating same faith but different power centres. Millions died in these battles of establishing supremacy over the region.
Islam spread through south Asia through Afghanistan, Pakistan and India mainly due to the Delhi Sultanate & Mughal empire’s strong battle tactics which never let local empires to establish a strong hold.
The silk route for trade enabled Islam to rise in east Asia (Indonesia, Malaysia, Brunei, etc).