Saad bin Abu Waqqas reported,

The Messenger of Allah ﷺ said, "Madinah is better for them, if only they knew. No one leaves it out of dislike for it without Allah replacing him in it with someone better. And no one endures its hardship and difficulty without my being an intercessor or a witness for him on the Day of Resurrection."

Azami 919

Sahih

عن سعد بن أبي وقاص قال

قال رسول الله ﷺ: المدينة خير لهم لو كانوا يعلمون لا يدعها أحد رغبة عنها إلا أبدل الله فيها من هو خير منه، ولا يثبت أحد على لأوائها وجهدها إلا كنت له شفيعا، أو شهيدا يوم القيامة.

الأعظمي 919صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Faith in the intercession of the Prophet ﷺ and others
Section
Intercession of the Prophet ﷺ for those who patiently endured the hardship of Madinah
Numbering
Jami al-Kamil 919 (2nd edition)
Azami 919