Rasoolullahﷺ said: “Among what continues to accrue for a believer of his good works after death are the following: knowledge that he learned and then imparted to others, a pious child whom he left behind, a copy of the Qur’ân that he bequeathed, a mosque that he built, a guest house he built for travelers, a river that he made to flow, and charity he spends from his wealth when he is in good health – all of this continues to avail him after his death.” [Sunan Ibn Majah and Sunan al-Bayhaqî – and graded as good (hasan) by al-Albânî]
And for those who destroy or in any way adversely affect or try to adversely affect masaajid of Allahﷻ, Allahﷻ clearly announced their fate:
وَمَنْ أَظْلَمُ مِمَّن مَّنَعَ مَسَاجِدَ اللّهِ أَن يُذْكَرَ فِيهَا اسْمُهُ وَسَعَى فِي خَرَابِهَا أُوْلَـئِكَ مَا كَانَ لَهُمْ أَن يَدْخُلُوهَا إِلاَّ خَآئِفِينَ لهُمْ فِي الدُّنْيَا خِزْيٌ وَلَهُمْ فِي الآخِرَةِ عَذَابٌ عَظِيمٌ
Baqara 2: 114. And who is more unjust than those who forbid that Allah’s Name be glorified and mentioned much (Salah, Dhikr, Dars etc.) in Allah’s masaajid and strives for their ruin? It was not fitting that such should themselves enter them (Allah’s masaajid) except in fear. For them there is disgrace in this world, and they will have a great torment in the Hereafter.