The Messenger of Allah ﷺ said, "It is not right for a Muslim man who has something to bequeath to spend two nights without having his will written down with him."
حدثنا مسدد بن مسرهد حدثنا يحيى بن سعيد عن عبيد الله
عن رسول الله ﷺ قال ما حق امرئ مسلم له شيء يوصي فيه يبيت ليلتين إلا ووصيته مكتوبة عنده
Muslim narrated it in Wasiyyah, chapter "A man's will written and kept with him," hadith no. 1627, from the hadith of Yahya Qattan. Bukhari narrated it in Wasaya, chapter "Wills," hadith no. 2738, from the hadith of Nafi, through him.