The Messenger of Allah (ﷺ) as saying: If anyone leaves property, it goes to his heirs. And if anyone leaves dependents (without resources), they come to us.
Sunan Abi Dawud Book 20, Hadith 28