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:39:2

Indeed, We have sent down to you the Book, ˹O Muhammad˺, in truth. So worship Allah, ˹being˺ sincere to Him in religion.  

Indeed We have revealed to you, O Muhammad (s), the Book with the truth (bi’l-haqqi is semantically connected to anzalnā, ‘We have revealed’); so worship God, devoting your religion purely to Him, ˹pure˺ of any idolatry, in other words, affirming His Oneness.
القرآن:٣٩:٢

إِنَّا أَنْزَلْنَا إِلَيْكَ الْكِتَابَ بِالْحَقِّ فَاعْبُدِ اللَّهَ مُخْلِصًا لَهُ الدِّينَ  

{إنا أنزلنا إليك} يا محمد {الكتاب بالحق} متعلق بأنزل {فاعبد الله مخلصا له الدين} من الشرك: أي موحدا له.

See similar narrations below:

Collected by Qurʾān
quran:39:11

Say, ˹O Muhammad˺, "Indeed, I have been commanded to worship Allah, ˹being˺ sincere to Him in religion.  

Say: ‘Indeed I have been commanded to worship God devoting ˹my˺ religion purely to Him, ˹pure˺ of any idolatry,
القرآن:٣٩:١١

قُلْ إِنِّي أُمِرْتُ أَنْ أَعْبُدَ اللَّهَ مُخْلِصًا لَهُ الدِّينَ  

{قل إني أمرت أن أعبد الله مخلصا له الدين} من الشرك.