Abu Hurairah reported,

The Prophet ﷺ said, "Whoever leaves behind wealth, it goes to the heirs, and whoever leaves behind dependents, they are our responsibility." The only difference is that in Ghundar's version it reads, "And whoever leaves behind dependents, I am their guardian."

Muslim 4162

Sahih

و حدثنيه أبو بكر بن نافع حدثنا غندر ح و حدثني زهير بن حرب حدثنا عبد الرحمن يعني ابن مهدي قالا حدثنا شعبة بهذا الإسناد غير أن في حديث غندر ومن ترك كلا وليته

مسلم 4162صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Obligatory duties
Chapter
Whoever leaves wealth, it is for his heirs
Numbering
Darussalam 4162
Muslim 4162