Surah At-Tawba

9:18

إِنَّمَا يَعْمُرُ مَسَٰجِدَ ٱللَّهِ مَنْ ءَامَنَ بِٱللَّهِ وَٱلْيَوْمِ ٱلْءَاخِرِ وَأَقَامَ ٱلصَّلَوٰةَ وَءَاتَى ٱلزَّكَوٰةَ وَلَمْ يَخْشَ إِلَّا ٱللَّهَ ۖ فَعَسَىٰٓ أُو۟لَٰٓئِكَ أَن يَكُونُوا۟ مِنَ ٱلْمُهْتَدِينَ

The mosques of Allah are only to be maintained by those who believe in Allah and the Last Day and establish prayer and give zakah and do not fear except Allah, for it is expected that those will be of the [rightly] guided.

Tafsir 9:18

It is only right that places of worship should be supported and cared for by those who have faith in Allah alone, who do not associate partners with Him, who have faith in the Day of Judgement, who establish the prayer, and give the Zakat from their wealth, and who do not fear anyone except for Allah, glory be to Him. Such people will be guided to the right path, while the idolaters are the farthest away from it.