Get your taxes done using TurboTax

you evidently didn't know you can maintain an HSA even after you have non-eligible coverage. you just can't contribute any additional funds starting with the month you had non-eligible coverage.  so say your under 55, had family coverage until August when the non-eligible family coverage started, So for 2020 you could have contributed $7100*7/12  or $4,142. since you put in $6,000 $2,958 had to be withdrawn (non-taxable and penalty free)  + earnings that would be taxed.  you say you closed out the account.  did you have qualifying medical expenses of about $7600+$4142. (line 15 of form 8889)  if so, there should be no penalty.  if not, there's a 20% penalty on withdrawals not used for eligible medical expenses. 

review form 8889.