The Messenger of Allah ﷺ said, "Do not undertake a journey except to three mosques, the Sacred Mosque, the Mosque of the Messenger of Allah ﷺ, and the Aqsa Mosque."
قال رسول الله ﷺ: لا تشد الرحال إلا إلى ثلاثة مساجد: المسجد الحرام، ومسجد رسول الله ﷺ، ومسجد الأقصى.
Bukhari related it in the Book of Prayer (1189), and Muslim in the Book of Hajj (1397), both from the hadith of Sufyan, from Zuhri, from Saeed, from Abu Hurairah, as mentioned. Its mention has already preceded in the Book of Prayer along with the rest of the hadiths.As for what has been reported, "Whoever prays forty prayers in my mosque is granted freedom from the Fire, freedom from punishment, and freedom from hypocrisy," and in other wordings, all of these are daif. However, some of them support one another, and the matter falls under a general principle, namely performing prayer in congregation. So there is no harm in a Muslim maintaining regular prayer in Masjid Nabawi without this specific condition, as I stated in Minna Kubra (4/417–420), where there are other useful points, so refer to it.