The tribe of Banu Salama lived on the outskirts of Madinah, and they wanted to move closer to the mosque. Then this verse was revealed, "Indeed, it is We who bring the dead to life and record what they have put forth and what they left behind" [Ya-Sin 36:12].So the Messenger of Allah ﷺ said, "Your footsteps are being recorded, so do not move."
كانت بنو سلمة في ناحية المدينة، فأرادوا النقلة إلى قرب المسجد، فنزلت هذه الآية: {إنا نحن نحيي الموتى ونكتب ما قدموا وآثارهم} فقال رسول الله ﷺ: إن آثاركم تكتب فلا تنتقلوا.
Reported by Tirmidhi (3226), Ibn Jareer Tabari in his Tafsir (19/410), and Hakim (2/428–429), all of them through the route of Sufyan bin Saeed Thawri, from Abu Sufyan Tarif bin Shihab, from Abu Nadra, from Abu Saeed Khudri, who related it.Abu Sufyan Tarif bin Shihab is daif, but he was not alone in narrating it, rather he was corroborated. Bazzar reported it, as Hafiz bin Kathir mentioned in his Tafsir, through the route of Shubah and Abdul-Ala, both of them from Saeed Jariri, from Abu Nadra, with the same wording.Jareeri had become confused in his later years, but the narration of Shubah and Abdul-Ala from him predates that confusion.