Surah Al-Baqarah 2:180
كُتِبَ عَلَيْكُمْ إِذَا حَضَرَ أَحَدَكُمُ ٱلْمَوْتُ إِن تَرَكَ خَيْرًا ٱلْوَصِيَّةُ لِلْوَٰلِدَيْنِ وَٱلْأَقْرَبِينَ بِٱلْمَعْرُوفِ ۖ حَقًّا عَلَى ٱلْمُتَّقِينَ
Prescribed for you when death approaches [any] one of you if he leaves wealth [is that he should make] a bequest for the parents and near relatives according to what is acceptable - a duty upon the righteous.
Translation: Saheeh International
Tafsir
Prescribed made obligatory for you when any of you is approached by death that is by its causes and leaves behind some good material possessions is to make testament al-wasiyyatu is in the nominative because of kutiba and is semantically connected to the particle idhā ‘when’ if the latter is adverbial; …
Excerpt from Tafsir al-Jalalayn, commentary on 2:180, via Quran.com. The reader has the full commentary and 9 more tafsirs.