The verse says...
The verse says: “And your Lord is more knowledgeable than any one who is in the heavens and the earth…” In other words, in this verse the meaning is beyond that, implying that Allah is aware not only of your status but also of that of all those who are in the skies and on the earth and He is the most aware of every one and knows their value better.
Then whoever He elects from among the angels and the prophets for a matter is not undue that merely He pleases it, but since He is aware of the true innate value of them and knows them eligible for the job, He elects them. Then He adds: “…and, certainly, We have made some of the prophets excel others…” By saying: ‘We have made some prophets excel others’ , here is meant the ‘’Ulul‘azm’, ‘prophets of the Book’.
We have it in traditions that there have been one hundred and twenty four thousand prophets, some of whom have been appointed for all the people and possess ‘celestial Books’. some, also, were commissioned for a particular region or over a certain group of people and were under the command of a greater prophet, carrying out his mission.
In other words, although prophets were placed at he highest echelon of virtues, there was a hierarchy for them which ranked them at various levels, excelling some over the others. This sentence is, in fact, an answer to one of the objections of the pagans, who used to claim in a humiliating tone of voice that: Had the Lord not any one else other than the orphan Muhammad (S) to appoint as a prophet?
Moreover, what made him be the leading figure among all the prophets and the ‘Seal of the Prophets’? The Qur’an implies that it is not astonishing that Allah is aware of the human values of every single individual and, hence, He has selected His prophets from among the bulk of the people. He has bestowed one with the title of “khalil-ullah” (the friend of Allah). He has conferred the title of “Rūh-ullah” on another one of His prophets.
He has selected the Prophet of Islam (S) as “Habib-ullah” (the friend of Allah). Briefly speaking, He has made some superior to others in His blessings in accordance with the criteria which He himself deems fit and His Wisdom so deems worthy of. Although Dawood was in charge of a vast territory, the Lord does not regard this matter as his prime object of pride.