What matters is not just building mosques but also attending and paying attention to religious programs and rituals held in them.
In the history of Islam, mosques have always served as sources of positive developments in Muslim countries. Mosques also help resolve problems of individuals and groups of people or even the entire society, in addition to contributing to the society’s growth.
That is why Islam lays great emphasis on building mosques and paying attention to their activities. Any move to destroy mosques or make them less vibrant is regarded as a great injustice.
God says in verse 114 of Surah Al-Baqarah: “Who is more unjust than those who strive to destroy the mosques and prevent others from commemorating the Name of God therein who could not enter the mosques except with fear. They, (the unjust ones), will be disgraced in this life and will receive great torment in the life hereafter.”
So any action that leads to presence of fewer people and worshippers in mosques can be regarded as destroying them.
It has been emphasized in interpreting verse 18 of Surah At-Tawbah “Only those who believe in God, the Day of Judgment, perform their prayers, pay the religious tax, and have fear of God alone have the right to establish and patronize the mosque of God so that perhaps they will have the right guidance,” that establishing mosques is not just building them, but supporting them by attending religious programs held in them where the Name of God is commemorated.
On the other hand, any move that causes people to forget the Name of God and stay away from mosques is a great injustice.