Ibn Umar (Allah be pleased with them) reported Allah's Messenger (ﷺ) as saying:
It is the duty of a Muslim who has something which is to be given as a bequest not to have it for two nights without having his will written down regarding it. (RU)
Reference (RU): Sahih Muslim 1627 a (RU)
In-book reference (RU): Book 25, Hadith 1 (RU)
USC-MSA web (English) reference(deprecated numbering scheme): Book 13, Hadith 3987 (RU)