Sahih Muslim 1627 d
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
مَا حَقُّ امْرِئٍ مُسْلِمٍ لَهُ شَىْءٌ يُوصِي فِيهِ يَبِيتُ ثَلاَثَ لَيَالٍ إِلاَّ وَوَصِيَّتُهُ عِنْدَهُ مَكْتُوبَةٌ "
Salim reported on the authority of his father ('Abdullah b. Umar) that he (his father) had heard Allah's Messenger (ﷺ) as saying:
It is not proper for a Muslim who has got something to bequeathe to spend even three nights without having his will written down with him regarding it. 'Abdullah b. 'Umar (Allah be pleased with them) said: Ever since I heard Allah's Messenger (ﷺ) say this I have not spent a night without having my will (written) along with me.
Full reference and source
Sahih Muslim 1627 d In-book : Book 25, Hadith 4 USC-MSA web (English) : Book 13, Hadith 3990 (deprecated)
View source on Sunnah.com (opens in a new tab)