That is because they disliked what Allah revealed, so He rendered worthless their deeds.
The Saheeh International Quran Translation
ذَٰلِكَ بِأَنَّهُمْ كَرِهُوا۟ مَآ أَنزَلَ ٱللَّهُ فَأَحْبَطَ أَعْمَٰلَهُمْThat is because they disliked what Allah revealed, so He rendered worthless their deeds.