Sunan Ibn Majah
2740
Sahih+2

It was narrated that Ibn ‘Abbas said:“The Messenger of Allah (ﷺ) said: ‘Distribute wealth among those who are entitled to shares of inheritance, according to the Book of Allah, then whatever is left over goes to the nearest male relative.’”

SahihAl-Albani
SahihMuhammad Fouad Abd al-Baqi