From Sahih Muslim (Hadith 4161):
Abu Huraira (Allah be pleased with him) reported Allah's Apostle (ﷺ) as saying:He who leaves property, that is for the inheritors; and he who leaves behind destitute children, then it is my responsibility (to look after them)
Reference: Muslim 4161