Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:42:8

And if Allah willed, He could have made them ˹of˺ one religion, but He admits whom He wills into His mercy. And the wrongdoers have not any protector or helper.  

And had God willed, He would have made them one community, in other words, following one religion, and that is Islam; but He admits whomever He will into His mercy, and the evildoers, the disbelievers, have neither guardian nor helper, to ward off the chastisement from them.
القرآن:٤٢:٨

وَلَوْ شَاءَ اللَّهُ لَجَعَلَهُمْ أُمَّةً وَاحِدَةً وَلَٰكِنْ يُدْخِلُ مَنْ يَشَاءُ فِي رَحْمَتِهِ ۚ وَالظَّالِمُونَ مَا لَهُمْ مِنْ وَلِيٍّ وَلَا نَصِيرٍ  

{ولو شاء الله لجعلهم أمة واحدة} أي على دين واحد، وهو الإسلام {ولكن يدخل من يشاء في رحمته والظالمون} الكافرون {ما لهم من وليّ ولا نصير} يدفع عنهم العذاب.