What is best way to fix that we kept contributing family amount to HSA after wife got a separate health plan?

For 2023 my wife and I were on same family health plan, so we contributed the full family contribution amount to my HSA. However in 2024, halfway through the year she got a new job with health insurance. I didn't take this into account and kept contributing the full family amount. What is the best way to handle this year and last years returns?