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:25:55

But they worship rather than Allah that which does not benefit them or harm them, and the disbeliever is ever, against his Lord, an assistant ˹to Satan˺.  

And they, the disbelievers, worship besides God that which neither benefits them, when they worship it, nor harms them, should they refrain therefrom — and these are idols; and the disbeliever is ever a partisan against his Lord, an assistant to Satan through his obedience to him.
القرآن:٢٥:٥٥

وَيَعْبُدُونَ مِنْ دُونِ اللَّهِ مَا لَا يَنْفَعُهُمْ وَلَا يَضُرُّهُمْ ۗ وَكَانَ الْكَافِرُ عَلَىٰ رَبِّهِ ظَهِيرًا  

{ويعبدون} أي الكفار {من دون الله ما لا ينفعهم} بعبادته {ولا يضرهم} بتركها وهو الأصنام {وكان الكافر على ربه ظهيرا} معينا للشيطان بطاعته.