Premium Tax Credit - Partial Year

Hello community. I signed up for Medicare in March 2023, for 2 months Jan-Feb had marketplace insurance with a premium credit due to very low income. Later in 2023 my income went up with retirement income received (when on Medicare). My taxes show a big repayment due although my income in Jan-Feb were very low. Can the repayment be based on monthly income or must it be for the whole calendar year?