The Messenger of Allah ﷺ said, "We are not inherited from. Whatever we leave behind is charity."
حدثنا صفوان بن عيسى أخبرنا أسامة بن زيد عن الزهري عن عروة
أن رسول الله ﷺ قال لا نورث ما تركنا فهو صدقة
Its isnad is sahih. Usama bin Zayd Laythi is trustworthy, and his narrations appear in Muslim.The hadith was narrated by Bukhari 6/197 no. 309 (Fath), in the chapter on the obligation of the khumus, and by Muslim 3/1379 no. 1758 in the book of jihad, and by Abu Dawud 3/144 no. 2976 in the book of kharaj.