HSA excess contribution in 2022 corrected in 2023

My wife contributed the full amount to her HSA for 2022. After realizing she would not meet the requirement for the full year in 2022 she withdrew half of it in 2023 prior to the tax filing deadline (she will qualify for 6 months contributions in 2022). Should we report this correction on our 2022 return or will it be done on our 2023 return? If we need to do it on the 2022 return, where is it done?

 

Thanks!