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:5:76

Say, "Do you worship besides Allah that which holds for you no ˹power of˺ harm or benefit while it is Allah who is the Hearing, the Knowing?"  

Say: ‘Do you worship besides God, that is, other than Him, what cannot hurt or profit you? God is the Hearer, of your sayings, the Knower’, of your circumstances (the interrogative is meant as a disavowal).
القرآن:٥:٧٦

قُلْ أَتَعْبُدُونَ مِنْ دُونِ اللَّهِ مَا لَا يَمْلِكُ لَكُمْ ضَرًّا وَلَا نَفْعًا ۚ وَاللَّهُ هُوَ السَّمِيعُ الْعَلِيمُ  

{قل أتعبدون من دون الله} أي غيره {ما لا يملك لكم ضرّا ولا نفعا والله هو السميع} لأقوالكم {العليم} بأحوالكم والاستفهام للإنكار.