Quran 42:30~31

وَالَّذِينَ اسْتَجَابُوا لِرَبِّهِمْ وَأَقَامُوا الصَّلَاةَ وَأَمْرُهُمْ شُورَىٰ بَيْنَهُمْ وَمِمَّا رَزَقْنَاهُمْ يُنفِقُونَ
“And those who have responded to their lord and established prayer and whose affair is [determined by] consultation among themselves, and from what We have provided them, they spend.” (42:38).

If Allah wanted He would have made all people into one Ummah, but He has given freedom to people to make their own choice by their free will.
Allah will judge all people on the Day of Judgment. In the Surah it is also mentioned that the followers of this message are those who avoid major sins and who manage their affairs with mutual consultation.

Allah revealed His message to His Prophets. The purpose of revelation is to warn people about the Day of Judgment. Had Allah willed, He would have forced all people into one Ummah, but the wrong-does will see the consequences of their deeds.
The judgment is in the hand of Allah. He gave the same religion to all His Prophets. Muslims must invite people to Allah.
Allah deals justly with all people. Allah accepts the repentance. Allah’s mercy is manifest in the universe.
Believers should avoid sins, be patient, work with each other in consultation and practice forgiveness.
The Prophet guides to the right path, the path of Allah.