Surah Aal-i-Imraan

3:177

إِنَّ ٱلَّذِينَ ٱشْتَرَوُا۟ ٱلْكُفْرَ بِٱلْإِيمَٰنِ لَن يَضُرُّوا۟ ٱللَّهَ شَيْـًۭٔا وَلَهُمْ عَذَابٌ أَلِيمٌۭ

Indeed, those who purchase disbelief [in exchange] for faith - never will they harm Allah at all, and for them is a painful punishment.

Tafsir 3:177

Those who exchange faith for disbelief will not harm Allah in any way: He is the Mighty and free from any need of His creation. They only harm themselves, and they will have a painful punishment in the Afterlife.