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:16:123

Then We revealed to you, ˹O Muhammad˺, to follow the religion of Abraham, inclining toward truth; and he was not of those who associate with Allah.  

Then We revealed to you, O Muhammad (s), ˹saying˺: ‘Follow the creed, the religion, of Abraham, a hanīf, and he was not of the idolaters’: this ˹remark˺ is repeated in order to refute to the claim of the Jews and Christians that they follow his religion.
القرآن:١٦:١٢٣

ثُمَّ أَوْحَيْنَا إِلَيْكَ أَنِ اتَّبِعْ مِلَّةَ إِبْرَاهِيمَ حَنِيفًا ۖ وَمَا كَانَ مِنَ الْمُشْرِكِينَ  

{ثم أوحينا إليك} دينه يا محمد {أن اتبع ملة} دينه {إبراهيم حنيفا وما كان من المشركين} كرر ردا على زعم اليهود والنصارى أنهم على دينه.

See similar narrations below:

Collected by Qurʾān
quran:2:135

They say, "Be Jews or Christians ˹so˺ you will be guided." Say, "Rather, ˹we follow˺ the religion of Abraham, inclining toward truth, and he was not of the polytheists."  

And they say, ‘Be Jews or Christians (the particle aw is for detail; the first of these is the saying of the Medinan Jews, while the second is that of the Christians of Najrān), and you shall be guided’. Say, to them: ‘Nay, we follow, rather the creed of Abraham, a hanīf (hanīfan is a circumstantial qualifier referring to Ibrāhīma, that is to say, one that inclines away from all other religions to the upright religion); and he was not of the idolaters’.
القرآن:٢:١٣٥

وَقَالُوا كُونُوا هُودًا أَوْ نَصَارَىٰ تَهْتَدُوا ۗ قُلْ بَلْ مِلَّةَ إِبْرَاهِيمَ حَنِيفًا ۖ وَمَا كَانَ مِنَ الْمُشْرِكِينَ  

{وقالوا كونوا هودا أو نصارى تهتدوا} أو للتفضيل وقائل الأول يهود المدينة والثاني نصارى نجران {قل} لهم {بل} نتبع {ملة إبراهيم حنيفا} حال من إبراهيم مائلا عن الأديان كلها إلى الدين القيّم {وما كان من المشركين}.
quran:3:95

Say, "Allah has told the truth. So follow the religion of Abraham, inclining toward truth; and he was not of the polytheists."  

Say: ‘God has spoken the truth, in this matter, just as He has in all that He has related; therefore follow the creed of Abraham, the one which I follow, a hanīf, inclining away from all religions towards submission (islām), and he was not an idolater’.
القرآن:٣:٩٥

قُلْ صَدَقَ اللَّهُ ۗ فَاتَّبِعُوا مِلَّةَ إِبْرَاهِيمَ حَنِيفًا وَمَا كَانَ مِنَ الْمُشْرِكِينَ  

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