Abu Saeed Khudri reported,

A man from Banu Khudrah and a man from Banu Amr bin Awf disputed about the mosque founded upon piety.The Khudri said, "It is the mosque of the Messenger of Allah ﷺ."The other said, "It is the mosque of Quba."So they came to the Messenger of Allah ﷺ about that, and he said, "It is this one," meaning his own mosque, "and in that there is much good."

Tirmidhi 323

Sahih

حدثنا قتيبة حدثنا حاتم بن إسمعيل عن أنيس بن أبي يحيى عن أبيه

عن أبي سعيد الخدري قال

امترى رجل من بني خدرة ورجل من بني عمرو بن عوف في المسجد الذي أسس على التقوى فقال الخدري هو مسجد رسول الله ﷺ وقال الآخر هو مسجد قباء فأتيا رسول الله ﷺ في ذلك فقال هو هذا يعني مسجده وفي ذلك خير كثير

الترمذي 323صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Prayer
Chapter
Masjid that was founded on piety
Numbering
Darussalam 323
Tirmidhi 323