Surah Muhammad (محمد) · verse 28 (Medinan · Juz 26 · page 509)
ذَٰلِكَ بِأَنَّهُمُ ٱتَّبَعُوا۟ مَآ أَسْخَطَ ٱللَّهَ وَكَرِهُوا۟ رِضْوَٰنَهُۥ فَأَحْبَطَ أَعْمَٰلَهُمْ ﴿28﴾
التفسير الميسر
ذلك العذاب الذي استحقوه ونالوه؛ بسبب أنهم اتبعوا ما أسخط الله عليهم من طاعة الشيطان، وكرهوا ما يرضيه عنهم من العمل الصالح، ومنه قتال الكفار بعدما افترضه عليهم، فأبطل الله ثواب أعمالهم من صدقة وصلة رحم وغير ذلك
Sahih International
That is because they followed what angered Allah and disliked [what earns] His pleasure, so He rendered worthless their deeds
Marmaduke Pickthall
That will be because they followed that which angereth Allah, and hated that which pleaseth Him. Therefor He hath made their actions vain
Abdullah Yusuf Ali
This because they followed that which called forth the Wrath of Allah, and they hated Allah's good pleasure; so He made their deeds of no effect