Get your taxes done using TurboTax

You can't.  If the money was actually deposited in 2023, it is a 2023 contribution.  

 

To avoid a 6% penalty on the excess contribution, you would need to remove the excess by October 15.  This is a special procedure with the HSA bank, not a normal withdrawal.  The money is added back to your taxable income, but there is no additional penalty if you remove it by tomorrow.  You must also remove any interest earned by the excess contribution (the HSA bank will know this).  Because the excess contribution was made in 2023, the interest is income on your 2023 return, even though it is not being paid out until 2024.  Enter the interest as "other income" on your tax return.

 

Or, another option (if you are still enrolled in an HSA-eligible plan) is to leave the money in the account and pay the 6% penalty for 2023 (which is only $18).  Then, stop your 2024 contributions early, so that your total of employer and employee contributions is $3850 or less (the 2024 limit is $4150, and you want to be $300 under that limit for 2024).  That way, the excess from 2023 will be absorbed into your 2024 limit and there will be no penalties in 2024 or the future.