I asked Ibn Abu Awfa, "Did the Messenger of Allah ﷺ make a will?"He replied, "No."I asked, "Then how was making a will prescribed upon the Muslims?"He answered, "He left as his testament the Book of Allah."
أخبرنا إسمعيل بن مسعود قال حدثنا خالد بن الحارث قال حدثنا مالك بن مغول قال
سألت ابن أبي أوفى أوصى رسول الله ﷺ قال لا قلت كيف كتب على المسلمين الوصية قال أوصى بكتاب الله
Bukhari reported it in "The Book of Wills," chapter "Wills," no. 2740, and Muslim reported it in "The Book of Wills," chapter "Leaving No Will for One Who Has Nothing to Bequeath," no. 1634, from the hadith of Malik bin Mughul, transmitted through him. It is also found in Al-Kubra, no. 6447.