The Messenger of Allah ﷺ said, "Distribute the estate among the heirs with fixed shares according to the Book of Allah, and whatever the fixed shares leave behind goes to the nearest male relative."
حدثنا أحمد بن صالح ومخلد بن خالد وهذا حديث مخلد وهو الأشبع قالا حدثنا عبد الرزاق حدثنا معمر عن ابن طاوس عن أبيه
قال رسول الله ﷺ اقسم المال بين أهل الفرائض على كتاب الله فما تركت الفرائض فلأولى ذكر
Reported by Muslim, Faraid, chapter, "Give the shares of inheritance to those entitled to them, and whatever remains goes to the nearest male relative," hadith 1615, from the hadith of Abdul-Razzaq, and Bukhari, Faraid, chapter on the inheritance of a child from his father and mother, hadith 6732, from the hadith of Ibn Tawus with the same chain, and it is found in Musannaf Abdul-Razzaq, hadith 19004.