Surah Yunus 10:106
وَلَا تَدْعُ مِن دُونِ ٱللَّهِ مَا لَا يَنفَعُكَ وَلَا يَضُرُّكَ ۖ فَإِن فَعَلْتَ فَإِنَّكَ إِذًا مِّنَ ٱلظَّـٰلِمِينَ
And do not invoke besides Allāh that which neither benefits you nor harms you, for if you did, then indeed you would be of the wrongdoers.'"
Translation: Saheeh International
Tafsir
and do not call upon do not worship besides God that which can neither profit you should you worship it nor hurt you should you not worship it; for if you do this hypothetically speaking then you will surely be of the evildoers.
Excerpt from Tafsir al-Jalalayn, commentary on 10:106, via Quran.com. The reader has the full commentary and 9 more tafsirs.