Surah Ghafir 40:12

The Forgiver · Verse 12 of 85 · Juz 24 · Page 468

ذَٰلِكُم بِأَنَّهُۥٓ إِذَا دُعِىَ ٱللَّهُ وَحْدَهُۥ كَفَرْتُمْ ۖ وَإِن يُشْرَكْ بِهِۦ تُؤْمِنُوا۟ ۚ فَٱلْحُكْمُ لِلَّهِ ٱلْعَلِىِّ ٱلْكَبِيرِ

[They will be told], "That is because, when Allāh was called upon alone, you disbelieved; but if others were associated with Him, you believed. So the judgement is with Allāh, the Most High, the Grand."

Translation: Saheeh International

Tafsir

That namely the chastisement which you find yourselves in is because during the life of this world when God was invoked alone you would disbelieve in His Oneness; but if partners were ascribed to Him you would believe you would accept such idolatry. …

Excerpt from Tafsir al-Jalalayn, commentary on 40:12, via Quran.com. The reader has the full commentary and 9 more tafsirs.