The Prophet ﷺ said, "Whoever dies while owing fasts, his guardian should fast on his behalf."
حدثنا أحمد بن صالح حدثنا ابن وهب أخبرني عمرو بن الحارث عن عبيد الله بن أبي جعفر عن محمد بن جعفر بن الزبير عن عروة
أن النبي ﷺ قال من مات وعليه صيام صام عنه وليه
Reported by Muslim, Fasting, chapter on making up fasting on behalf of the deceased, hadith no. 1147, from the hadith of Abdullah Ibn Wahb, and Bukhari, Fasting, chapter on one who dies while still owing fasting, hadith no. 1952, from the hadith of Amr bin Harith.