A masjid is not just a place for daily prayers. It is used as a school for children to learn the Quran and about Islam.
It’s an important meeting place for a community, helping people discuss issues, plan their livelihoods, get married, and somewhere to cool off from the heat of the midday sun.
The Prophet ﷺ said,"Whoever guides someone to goodness will have a reward equal to it." Source Sahih Muslim 1893