A mosque is the best of places. It is more blessed and virtuous than all other places. The Prophet (peace be upon him) said:
“The most beloved of places to Allah is the mosque, and the most detested of places to Allah is the marketplace.” [Sahîh Muslim]
There is great reward in building a mosque for Allah’s sake. The Prophet (peace be upon him) said:
“Whoever builds a mosque for Allah, Allah will build for him likewise in Paradise.” [Sahîh al-Bukhârî and Sahîh Muslim]
In some narrations of this hadith, it reads
“Whoever builds a mosque seeking Allah’s pleasure…”
It is also narrated that the Prophet (peace be upon him) said:
“Whoever build a mosque for Allah – be it large or small – Allah will build for him a house in Paradise.” [Sunan al-Tirmidhî – and graded as good (hasan) by al-Albânî]
The building of a mosque is a way for a person to continue to earn blessings after death.
And Allah knows best.