There are many verses in the Quran on this subject. For example, in Surah al-Kahf it is said:
أُولَـئِكَ الَّذِينَ كَفَرُوا بِآيَاتِ رَبِّهِمْ وَلِقَائِهِ فَحَبِطَتْ أَعْمَالُهُمْ فَلَا نُقِيمُ لَهُمْ يَوْمَ الْقِيَامَةِ وَزْنًا ٭ ذَلِكَ جَزَاؤُهُمْ جَهَنَّمُ بِمَا كَفَرُوا وَاتَّخَذُوا آيَاتِي وَرُسُلِي هُزُوًا
“They are those whose efforts in the life of this world were all wasted, while they kept thinking that they were doing very good deeds. These are the ones who disbelieved in the signs of their Lord and in meeting Him, so their deeds have been wasted, and on the Day of Resurrection We will not establish any weight for them.”
In the verse before it, He said:
قُلْ هَلْ نُنَبِّئُكُمْ بِالْأَخْسَرِينَ أَعْمَالًا ٭ الَّذِينَ ضَلَّ سَعْيُهُمْ فِي الْحَيَاةِ الدُّنْيَا وَهُمْ يَحْسَبُونَ أَنَّهُمْ يُحْسِنُونَ صُنْعًا
“Say: Shall I inform you who are the greatest losers in respect of their deeds? They are those whose efforts in the life of this world were all wasted, while they kept thinking that they were doing very good deeds.”
In the verse, by أُولَـئِكَ (these people) the complete mention of those people is intended, whose deeds were ruined and whose efforts were wasted. And who were these people? الذين كفروا بايات ربهم They are those who denied those signs of Allah that set out the transmitted and rational proofs of tawhid, ولقائه and who also did not believe in the resurrection, the gathering, and the matters of the Hereafter. فحبطت اعمالهم فلا نقيم لهم يوم القيمة وزنا So We will make such people utterly worthless, with the greatest contempt, and their deeds will have no standing on the Day of Resurrection. In some verses on this subject it is mentioned that among the people of the Jahiliyyah there were some who denied some of the signs of Allah rather than all of them, and some who were guilty merely of turning away and averting themselves. And it is also not hidden from anyone that even in the present age there are quite a few people who deny and oppose the signs of Allah even more than the people of the Jahiliyyah did.