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:36:22

And why should I not worship He who created me and to whom you will be returned?  

And why should I not worship Him Who originated me, ˹Him Who˺ created me — in other words: there is nothing to prevent me from worshipping Him when the necessitating factors for this exist, and the same applies to you — and to Whom you shall be returned?, after death, whereupon He will requite you for your disbelief.
القرآن:٣٦:٢٢

وَمَا لِيَ لَا أَعْبُدُ الَّذِي فَطَرَنِي وَإِلَيْهِ تُرْجَعُونَ  

فقال {وما لي لا أعبد الذي فطرني} خلقني، أي لا مانع لي من عبادته الموجود مقتضيها وأنتم كذلك {وإليه ترجعون} بعد الموت فيجازيكم بكفركم.