The Messenger of Allah ﷺ said, "Every prophet was sent only to his own people, but I have been sent to all of humanity."
قال رسول الله ﷺ: كان النبي يبعث إلى قومه خاصة، وبعثت إلى الناس عامة.
Bukhari related it in the chapter on tayammum (335), and Muslim in the chapter on mosques (521), both from the hadith of Hushaym, "Sayyar informed us, he said, Yazid bin Suhayb the Jurist told us, he said, Jabir bin Abdullah informed us," and he related it within a lengthy hadith.This necessitates that the Prophet ﷺ be the last of the prophets, for his prophethood encompasses all time and place. Allah the Exalted has said, "Muhammad is not the father of any of your men, but he is the Messenger of Allah and the seal of the prophets, and Allah has knowledge of all things" [Ahzab 33:40]