There are certain circumstances where a person might not be able to fast during Ramadan for a legitimate reason such as the sick or elderly.
If they are not able to make up the fasts, they should feed one poor person for each day that was missed.
Allah (SWT) says:
So whoever among you is ill or on a journey – then an equal number of days [are to be made up]. And upon those who are able [to fast, but with hardship] – a ransom [as substitute] of feeding a poor person [each day]. And whoever volunteers excess – it is better for him. But to fast is best for you, if you only knew.al-Baqarah 2:184
Al-Bukhari narrated that Ibn ‘Abbas said: This has not been abrogated (Mansoukh). It refers to old men and old women who are not able to fast, so they should feed a needy person for each day.