All Prophets are Muslims
Allâh ta`âlâ said :
﴿ وَمَن يَبْتَغِ غَيْرَ الإِسْلاَمِ دِينًا فَلَن يُقْبَلَ مِنْهُ وَهُوَ فِي الآخِرَةِ مِنَ الْخَاسِرِينَ ﴾
which means: « the one who takes a religion other than Islam, it will not be accepted from him and he will be among the losers in the Hereafter. » [Surat ‘Ali `Imrân, 'âyah 85]. Islam is the only religion in accordance with the sound mind.
And the Prophet, Salla l-Lâhu `alayhi wa sallam, has said:
« أَفْضَلُ مَا قُلْتُ أَنَا وَالنَّبِيُّونَ مِنْ قَبْلِي لاَ إِلَهَ إِلاَّ الله وَحْدَهُ لاَ شَرِيكَ لَهُ »
(‘afDalu mâ qultu ‘anâ wa n-nabiyyûna min qablî lâ ‘ilâha illa l-Lâhu waHdahu lâ charîka lah)
Which means: « The best thing I’ve ever said, me and the prophets before me too, is: Lâ ilâha illa l-Lâhu waHdahu lâ charîka lah ; There is no deity except Allâh, The Unique Who has not partners. »
Islam is the only heavenly religion. Thus it is not permissible to say that Islam is the last religion, because Islam is the first religion and the only religion that God has revealed to all the prophets and the only valid religion according to the sound mind. Islam is the religion of all angels and angels existed before humans. In the same way Adam, the first prophet is Muslim like all prophets. For two thousand years, during the time of Prophets Adam, Chîth and Idrîs, all humans were Muslims ; after the death of the prophet Idris, people worshiped for the first time the statues and idols and thus became disbelievers, after which God sent the fourth prophet Noah to call the people back to Islam.
See: Islam is the religion of all the Prophets. Unique True Religion
https://www.islam.ms/en/?p=36