All Praise to Allah Subhanahu wa Taala and blessings of Him be on Prophet Muhammad peace be upon him His family and companions
As Drwael has answered I want to make an addition ,In Quran Surah Baqarah , Allah Swt says
قَالُوا۟ كُونُوا۟ هُودًا أَوْ نَصَـٰرَىٰ تَهْتَدُوا۟ ۗ قُلْ بَلْ مِلَّةَ إِبْرَٰهِـۧمَ حَنِيفًا ۖ وَمَا كَانَ مِنَ ٱلْمُشْرِكِينَ
They say: “Be Jews,” or “Be Christians.” “Then you will be rightly
guided.” Say to them: “No, follow exclusively the way of Abraham who
was not one of those who associate others with Allah in His Divinity
It is narrated from Ibn Abbas Ra which interpretes that some well known jews and christians from madinah gathered and did debate with Muslims on religion and claiming their religion to be best and refusing prophethood of Prophet Muhammad peace be upon him ,rejecting Quran as the holy book and asking muslims to enter into their deen or religion so Allah Swt revealed this ayah.
Keeping in mind that teachings of the Judaism is not assosciated with Propet Moses or Moosa peace be upon him or christianity to prophet Jesus or Isa peace be upon him directly as they are later formed and their inspiration contradict to the teachings of Prophet Abraham (Ibrahim).So on one side both Jews and Christians claim to follow the way of Prophet Abraham peace be upon him but are also involved in Shirk.
So Prophet Muhammad peace be upon him was following the way of Prophet Abraham which rejects any idea of polytheism and believing oneness of God.
Allah Swt and his Messenger knows best