Al-Baqarah 2:264
يَـٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوا۟ لَا تُبْطِلُوا۟ صَدَقَـٰتِكُم بِٱلْمَنِّ وَٱلْأَذَىٰ كَٱلَّذِى يُنفِقُ مَالَهُۥ رِئَآءَ ٱلنَّاسِ وَلَا يُؤْمِنُ بِٱللَّهِ وَٱلْيَوْمِ ٱلْـَٔاخِرِ ۖ فَمَثَلُهُۥ كَمَثَلِ صَفْوَانٍ عَلَيْهِ تُرَابٌ فَأَصَابَهُۥ وَابِلٌ فَتَرَكَهُۥ صَلْدًا ۖ لَّا يَقْدِرُونَ عَلَىٰ شَىْءٍ مِّمَّا كَسَبُوا۟ ۗ وَٱللَّهُ لَا يَهْدِى ٱلْقَوْمَ ٱلْكَـٰفِرِينَ
Ya ayyuha allatheena amanoola tubtiloo sadaqatikum bilmanniwal-atha kallathee yunfiqu malahuri-aa annasi wala yu/minu billahiwalyawmi al-akhiri famathaluhu kamathali safwaninAAalayhi turabun faasabahu wabilunfatarakahu saldan la yaqdiroona AAalashay-in mimma kasaboo wallahu layahdee alqawma alkafireen
O you who have believed, do not invalidate your charities with reminders [of it] or injury as does one who spends his wealth [only] to be seen by the people and does not believe in Allāh and the Last Day. His example is like that of a [large] smooth stone upon which is dust and is hit by a downpour that leaves it bare. They are unable [to keep] anything of what they have earned. And Allāh does not guide the disbelieving people.
O you who believe, do not nullify your acts of charity by boasting about (doing people a) favour and by causing (them) hurt, like the one who spends his wealth to show off before peopleand does not believe in Allah and in the Last Day. So, his example is like a rock on which there is dust, then a heavy rain came over it and left it barren. They have no ability to gain anything out of what they have done, and Allah does not give guidance to the people who disbelieve.