It is an Islamic belief that every nation was sent a Messenger for their guidance. The important matter was the concept of Tawheed's belief in the Oneness of Allah). The secondary matter was Sharee'ah, or religious Law, which kept changing from tribe to tribe and nation to another. Allah the Highest alone knows what is good for His creation.
As mentioned in the Quran, it means: "And for every nation is a messenger. So when their Messenger comes, it will be judged between them an injustice, and they will not be wronged." [Quran 10:47] And: "And We certainly sent into every nation a messenger, [saying]: 'Worship Allah and avoid Taaghoot [ie, false deities]'. And among them were those upon whom error was [deservedly] decreed So proceed [ie, travel] through the earth and observe how was the end of the deniers." [Quran 16:36]
Some of these Messengers are mentioned in the Quran by Allah and some of them are not, as the Quran says, which means: "And We have certainly sent messengers before you [O Muhammad ????]. Among them are those [whose stories] We have related to you, and among them are those [whose stories] We have not related to you. And it was not for a messenger to bring a sign [or verse] except by permission of Allah. So when the command of Allah comes, it will be concluded [ie, judged] in truth, and the falsifiers will thereupon lose [all]." [Quran 40:78]
https://www.egypttales.com/2021/11/islam-every-nation-was-sent-messenger.html