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:6:78

And when he saw the sun rising, he said, "This is my lord; this is greater." But when it set, he said, "O my people, indeed I am free from what you associate with Allah.  

And when he saw the sun rising, he said, ‘This is my Lord; this is greater!’ than the star and the moon (the masculine ˹demonstrative pronoun˺ hādhā, ‘this’, is used ˹for the feminine shams, ‘sun’˺ because the predicate ˹rabbī, ‘my Lord’˺ is masculine). But when it set, and the argument against them had become stronger and they still had not repented, he said, ‘O my people, surely I am innocent of what you associate, with God, in the way of idols and accidental bodies, which require an originator. They then asked him, ‘What do you worship?’
القرآن:٦:٧٨

فَلَمَّا رَأَى الشَّمْسَ بَازِغَةً قَالَ هَٰذَا رَبِّي هَٰذَا أَكْبَرُ ۖ فَلَمَّا أَفَلَتْ قَالَ يَا قَوْمِ إِنِّي بَرِيءٌ مِمَّا تُشْرِكُونَ  

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