The Prophet ﷺ said, "Give the Fara'id (the shares of the inheritance that are prescribed in the Qur'an) to those who are entitled to receive it; and whatever is left should be given to the closest male relative of the deceased." (Using translation from Bukhārī 6746)
عَنْ رَسُولِ اللهِ ﷺ قَالَ أَلْحِقُوا الْفَرَائِضَ بِأَهْلِهَا فَمَا تَرَكَتِ الْفَرَائِضُ فَلِأَوْلَى رَجُلٍ ذَكَرٍ