Deductions & credits

@Spino 

Whether a person qualifies to be claimed as a dependent is judged based on all the factors for the whole year (and the original poster never said he was not a dependent.)  You can't be a dependent for half the year, you either are or you aren't, based on all the facts.  If the son can be claimed as a dependent on the parent's tax return for 2022, based on all the facts under consideration for 2022, then he is not eligible to contribute to an HSA.

 

The rules are in publication 969, specifically the bottom of page 3 and top of page 4 of the PDF version.

https://www.irs.gov/pub/irs-pdf/p969.pdf

 

The rules for handling excess HSA contributions are also in publication 969 and I described them.  He can leave the money in the HSA and pay a 20% penalty or he can withdraw the excess before the tax filing deadline of April 18.  A "return of excess contribution" is a special type of withdrawal, not a normal withdrawal, and the HSA bank may require separate paperwork.