Allah swt said,
(Truly, the religion with Allah is Islam.) Allah states that there is no religion accepted with Him from any person, except Islam. Islam includes obeying all of the Messengers until Muhammad who finalized their commission, thus closing all paths to Allah except through Muhammad .
Therefore, after Allah sent Muhammad , whoever meets Allah following a path other than Muhammad’s, it will not be accepted of him. In another verse of the Holy Quran, Allah swt says;
(And whoever seeks a religion other than Islam, it will never be accepted of him) ﴿(The Holy Quran, 3:85﴾.
In this Ayah ﴿(The Holy Quran, 3:19﴾, Allah said, asserting that the only religion accepted with Him is Islam,
(Truly, the religion with Allah is Islam.)
Allah then states that those who were given the Scripture beforehand divided in the religion after Allah sent the Messengers and revealed the Books to them providing them the necessary proofs to not do so. Allah said,
(Those who were given the Scripture (Jews and Christians) did not differ except out of rivalry, after knowledge had come to them.) meaning, some of them wronged others. Therefore, they differed over the truth, out of envy, hatred and enmity for each other.
This hatred made some of them defy those whom they hated even if they were correct. Allah then said,
(And whoever disbelieves in the Ayat of Allah) meaning, whoever rejects what Allah sent down in His Book,
(then surely, Allah is Swift in reckoning.) Allah will punish him for his rejection, reckon him for his denial, and torment him for defying His Book. Thereafter, Allah swt said;
(So if they dispute with you (Muhammad )) so if they argue with you about Tawhid,
(Say: “I have submitted myself to Allah (in Islam), and (so have) those who follow me”) meaning, Say, `I have made my worship sincere for Allah Alone without partners, rivals, offspring or companion,
(and those who follow me) who followed my religion and embraced my creed.’ In another Ayah, Allah said,
(Say (O Muhammad ): “This is my way; I invite unto Allah with sure knowledge, I and whosoever follows me…”) )
[The Holy Quran, 12:108]