Abu Hurairah reported,

The Prophet ﷺ said, "There is no believer except that I am closer to him than anyone else in this world and the next. Recite, if you wish, 'The Prophet is closer to the believers than their own selves' [Ahzab 33:6]. So whichever believer leaves behind wealth, let his paternal relatives inherit it, whoever they may be. But if he leaves behind a debt or dependents in need, let them come to me, for I am his guardian."

Bukhari 4781

Sahih

حدثنا إبراهيم بن المنذر حدثنا محمد بن فليح حدثنا أبي عن هلال بن علي عن عبد الرحمن بن أبي عمرة

عن أبي هريرة رضي الله عنه

عن النبي ﷺ قال ما من مؤمن إلا وأنا أولى الناس به في الدنيا والآخرة اقرءوا إن شئتم {النبي أولى بالمؤمنين من أنفسهم} فأيما مؤمن ترك مالا فليرثه عصبته من كانوا فإن ترك دينا أو ضياعا فليأتني فأنا مولاه

البخاري 4781صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tafsir
Chapter
His saying, "No soul knows what has been hidden for them of Qurra Ayun"
Numbering
Darussalam 4781
Bukhari 4781