Messenger of Allah ﷺ said, "It is not permissible for any Muslim who has something to will to stay for two nights without having his last will and testament written and kept ready with him." (Using translation from Bukhārī 2738)
قَالَ رَسُولُ اللهِ ﷺ «مَا حَقُّ امْرِئٍ مُسْلِمٍ لَهُ شَيْءٌ يُوصَى فِيهِ أَنْ يَبِيتَ لَيْلَتَيْنِ إِلَّا وَوَصِيَّتُهُ مَكْتُوبَةٌ عِنْدَهُ»