ءَامَنَ ٱلرَّسُولُ بِمَآ أُنزِلَ إِلَيۡهِ مِن رَّبِّهِۦ وَٱلۡمُؤۡمِنُونَۚ كُلٌّ ءَامَنَ بِٱللَّهِ وَمَلَٰٓئِكَتِهِۦ وَكُتُبِهِۦ وَرُسُلِهِۦ لَا نُفَرِّقُ بَيۡنَ أَحَدٖ مِّن رُّسُلِهِۦۚ وَقَالُواْ سَمِعۡنَا وَأَطَعۡنَاۖ غُفۡرَانَكَ رَبَّنَا وَإِلَيۡكَ ٱلۡمَصِيرُ
The Messenger has believed in what was revealed to him from his Lord, and [so have] the believers. All of them have believed in Allah and His angels and His books and His messengers, [saying], "We make no distinction between any of His messengers." And they say, "We hear and we obey. [We seek] Your forgiveness, our Lord, and to You is the (final) destination."
So, are there only 25 Prophets and Messengers in Islam?
In monotheism are often introduced to the names of 25 Prophets and Messengers. The 25 people are human beings who are appointed by Allah to be both Prophets and Messengers and are mentioned in the Quran. The names of the 25 Prophets and Messengers are:
Prophet Adam, Prophet Idrees, Nuuh (Noah), Prophet Hud, Prophet Sholeeh, Prophet Ibrahiim (Abraham), Prophet Luth, Prophet Ismaeel, Prophet Ishaaq, Prophet Ya'quub, Prophet Yusuf (Joseph), Prophet Ayyuub, Prophet Syu'aib, Prophet Haruun, Prophet Musa (Moses), Prophet Yasa’, Prophet Dzulkifli, Prophet Dawud, Prophet Sulaiman, Prophet Ilyaas, Prophet Yunus, Prophet Zakaria, Prophet Yahya, Prophet Isa (Jesus), and Prophet Muhammad.
However, the actual amount of Prophets and Messengers is not only 25. The names of the 25 prophets and Messengers above must be known because only that is mentioned in the Quran.
Maybe someone has heard of figures like the Prophet Khidir, Prophet Sam'un, and Samuel. Beyond the 25 Prophets, there are many Prophets and Messengers who are not revealed by the Quran. Allah says in Surat al-Nisa verse 164:
وَرُسُلٗا قَدۡ قَصَصۡنَٰهُمۡ عَلَيۡكَ مِن قَبۡلُ وَرُسُلٗا لَّمۡ نَقۡصُصۡهُمۡ عَلَيۡكَۚ وَكَلَّمَ ٱللَّهُ مُوسَىٰ تَكۡلِيمٗا
And (We sent) messengers about whom We have related [their stories] to you before and messengers about whom We have not related to you. And Allah spoke to Moses with [direct] speech.
In the interpretation of Ibn Kathir explained, that the ulema differed opinions regarding the number of Prophets and Messengers. Popular opinion states that the number of Prophets is 124,000, and the number of Messenger is 313. While according to Imam al-Baijuri, it is better to stop determining the number of Prophets and Messenger. Because it can result in someone who will claim that people who are not Prophets and Messengers become Prophets and Messengers, and vice versa.
Regarding the predicate of the Prophet and Messenger, the ulema has a different opinion. Some say both are the same, others say differently. Some ulema stated that the Prophet was a man who got the revelation but was not ordered to deliver the revelation, while the Messenger was a man who got the revelation and was ordered to convey the revelation to his people.
Based on Surah al-Nisa above, there are messengers of Allah who deliberately by Allah are not told in the Qur'an. So it could have been in the past that there were people who were wise, had faith in Allah even though they were different from the people of Muhammad in carrying out the Shari'a, and they were the noble messengers of Allah. So we need to be careful, not to view them as low human beings who do not know Islam.