The Prophet ﷺ used to say, "I am closer to every believer than he is to himself. So whoever dies leaving a debt, it falls to me, and whoever leaves wealth, it goes to his heirs."
حدثنا أحمد بن حنبل حدثنا عبد الرزاق عن معمر عن الزهري عن أبي سلمة
عن النبي ﷺ كان يقول أنا أولى بكل مؤمن من نفسه فأيما رجل مات وترك دينا فإلي ومن ترك مالا فلورثته
[Hasan] Reported by Nasai, Funerals, chapter on the funeral prayer for one who has debt, no. 1964, from the hadith of Abdul-Razzaq through this route, and it is found in his Musannaf, no. 15257, and Musnad Ahmad 3/296, see also no. 3343.