How to amend 2023 tax return to correct mistaken HSA contribution for a self-employee

My wife who is a self-employee made an HSA contribution in 2023. After we filed our joint tax return, we received a Form 5498-SA and realized that we contributed to the HSA account which she was not eligible because her insurance was not high deductible plan. We did not claim/deduct the contributions for the tax filing. We took the contributions out of the HSA account by using Return of Excessive Contribution. How do we amend the tax return?