The Cow - 2:213 Mankind were a single community. Allah sent messengers as bearers of glad tidings and warners and sent down with them the Book containing the truth so that they might judge between the people in matters wherein they differed. But those who were given the Book disputed about it out of envy among themselves after clear proofs had come to them. But Allah, by His permission, brought the believers to the truth about which they differed. Allah guides whom He wills/whosoever He wills.
People used to be united in a common belief, then they became divided:
The Cow/2:213 Mankind were a single community. Allah sent messengers as bearers of glad tidings and warners and sent down with them the Book containing the truth so that they might judge between the people in matters wherein they differed. But those who were given the Book disputed about it out of envy among themselves after clear proofs had come to them. But Allah, by His permission, brought the believers to the truth about which they differed. Allah guides whom He wills/whosoever He wills.

Prophet Jonah/10:99 Had your Lord willed, all those on the earth would have believed. Then will you force the people to believe?

Prophet Hud/11:118 Had your Lord willed, He would have made the people one people. But they will always dispute (the truth).

The Bee/16:93 Had Allah willed, He could have made you one people. But He leads astray whom He wills and guides whom He wills. Surely you will be questioned about what you used to do.

Council/42:8 Had Allah willed, He could have made them one people. But He lets whom He wills into His mercy. The wrongdoers have no owner or helper.

The Table Spread/5:48 We have sent down to you this Book, which confirms the previous Books and replaces them, as a comprehensive truth, so judge between them by what Allah has sent down to you. Do not leave the truth that has come to you and follow their whim. We have appointed for each of you a law and a method, and if Allah had willed, He would have made you all one people. But He tests you with what He has given you. Compete in good deeds. To Allah is the return of all of you. He will inform you of the matters on which you differ.

Prophet Jonah/10:19 Mankind were one people, then they differed. Had it not been for a promise of your Lord, they would have been judged between them at once in that in which they differed.