Sure Al-Baqara

2:264

يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوا۟ لَا تُبْطِلُوا۟ صَدَقَٰتِكُم بِٱلْمَنِّ وَٱلْأَذَىٰ كَٱلَّذِى يُنفِقُ مَالَهُۥ رِئَآءَ ٱلنَّاسِ وَلَا يُؤْمِنُ بِٱللَّهِ وَٱلْيَوْمِ ٱلْءَاخِرِ ۖ فَمَثَلُهُۥ كَمَثَلِ صَفْوَانٍ عَلَيْهِ تُرَابٌۭ فَأَصَابَهُۥ وَابِلٌۭ فَتَرَكَهُۥ صَلْدًۭا ۖ لَّا يَقْدِرُونَ عَلَىٰ شَىْءٍۢ مِّمَّا كَسَبُوا۟ ۗ وَٱللَّهُ لَا يَهْدِى ٱلْقَوْمَ ٱلْكَٰفِرِينَ

O die ihr glaubt, macht nicht eure Almosen durch Vorhaltungen und Beleidigungen zunichte, wie derjenige, der seinen Besitz aus Augendienerei vor den Menschen ausgibt und nicht an Allah und den Jüngsten Tag glaubt! So ist sein Gleichnis das eines glatten Steins mit Erdreich darüber: Ein heftiger Regenguß trifft ihn und läßt ihn nackt. Sie haben keine Macht über etwas von dem, was sie erworben haben. Allah leitet das ungläubige Volk nicht recht.

Tafsir 2:264

O you who have faith in Allah and follow His Messenger, do not ruin the reward of your charity by boasting about it and hurting the person to whom you gave it. A person who does this is like one who spends to be seen and praised by people, and does not have faith in Allah and in the reward and punishment on the Day of Resurrection. This is like a smooth stone on which there is some dust: when heavy rain falls onto it, the dust is washed away and the stone is left smooth with nothing on it. Similarly, the reward of the actions and charity of those who show off does not remain in the sight of Allah. Allah does not guide disbelievers to what pleases Him and benefits them in their actions and spending.