Abu Hurairah reported,

The Prophet ﷺ said, "The Children of Israil were governed by the prophets. Whenever a prophet died, another prophet succeeded him. But there will be no prophet after me. There will be caliphs, and they will be many."The companions asked, "What do you command us to do?"He replied, "Fulfill your pledge of allegiance to the first one, then the next. Give them their due, for Allah will question them about what He entrusted to their care."

Azami 750

Sahih

عن أبي هريرة

عن النبي ﷺ: كانت بنو إسرائيل تسوسهم الأنبياء، كلما هلك نبي خلفه نبي، وأنه لا نبي بعدي، وسيكون خلفاء فيكثرون قالوا: فما تأمرنا؟ قال: فوا ببيعة الأول فالأول، أعطوهم حقهم، فإن الله سائلهم عما استرعاهم.

الأعظمي 750صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Faith in the Prophet ﷺ
Section
Obligation of believing that the Prophet ﷺ is the seal of the prophets and there is no prophet after him
Numbering
Jami al-Kamil 750 (2nd edition)