Sunan an Nasai 688
The Book of the Masjids
أَخْبَرَنَا عَمْرُو بْنُ عُثْمَانَ، قَالَ حَدَّثَنَا بَقِيَّةُ، عَنْ بَحِيرٍ، عَنْ خَالِدِ بْنِ مَعْدَانَ، عَنْ كَثِيرِ بْنِ مُرَّةَ، عَنْ عَمْرِو بْنِ عَبَسَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " مَنْ بَنَى مَسْجِدًا يُذْكَرُ اللَّهُ فِيهِ بَنَى اللَّهُ عَزَّ وَجَلَّ لَهُ بَيْتًا فِي الْجَنَّةِ " .
It was narrated from 'Amr bin 'Abasah that the Messenger of Allah (ﷺ) said:"Whoever builds a Masjid in which Allah is remembered, Allah, (the Mighty and Sublime) will build for him a house in Paradise
Grading: Abu Ghuddah: Sahih · Al-Albani: Sahih · Zubair Ali Zai: Sahih
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.