Allah's Messenger (ﷺ) said, "Whoever died and he ought to have fasted (the missed days of Ramadan) then his guardians must fast on his behalf."
Sahih al-Bukhari Book 30, Hadith 59