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:39:45

And when Allah is mentioned alone, the hearts of those who do not believe in the Hereafter shrink with aversion, but when those ˹worshipped˺ other than Him are mentioned, immediately they rejoice.  

And when God is mentioned alone, that is, without ˹the mention of˺ their gods, thereat shrink, they are repelled and they become constricted, the hearts of those who do not believe in the Hereafter; but when those ˹others˺ besides Him, namely, the idols, are mentioned, behold, they rejoice!
القرآن:٣٩:٤٥

وَإِذَا ذُكِرَ اللَّهُ وَحْدَهُ اشْمَأَزَّتْ قُلُوبُ الَّذِينَ لَا يُؤْمِنُونَ بِالْآخِرَةِ ۖ وَإِذَا ذُكِرَ الَّذِينَ مِنْ دُونِهِ إِذَا هُمْ يَسْتَبْشِرُونَ  

{وإذا ذكر الله وحده} أي دون آلهتهم {اشمأزَّت} نفرت وانقبضت {قلوب الذين لا يؤمنون بالآخرة وإذا ذكر الذين من دونه} أي الأصنام {إذا هم يستبشرون}.