filing an amended tax return

dear community,

 

i already filed my 2023 taxes a few weeks ago, but just realized that i could also deduct my hsa contributions, which i did not include in the original return.  the amount that i originally had to pay on my federal return got cut in half after i calculated in my hsa contributions.  i already had the original amount which i owed on my federal return withdrawn from bank account by the irs. if i am able to file an amended tax return for 2023 to correct the hsa omission from the original return, will the irs refund me the difference, since with the amended tax return for the federal tax will be half of what i ended up paying. thank you so kindly for your help and advice.