Retirement tax questions

"will have to withdraw the contributions I made since first signing up for medicate"

 

That's not quite correct.

 

If you enrolled in Medicare on March 1, then you were eligible to make HSA contributions for 2 months.  Your contribution limit for 2023 would be $1483 if you are covered by a family HDHP, or $792 if you were covered by a single HDHP.  However, contributions can be made at any time during the year, even after you enroll in medicare, as long as the total is not more than I indicated.  For example, if you contributed $100 per month and your eligible limit is $792, then you have $408 of excess contributions ($1200 minus $792), not $1000 of excess ($100 per ineligible month).  Of course, if you were contributing the maximum ($729/month) then you would need to remove all the contributions made after your enrollment in Medicare.