I had excess HSA contribution, but my W-2 Box 12 Code W and Form 5498-SA Box 2 are not the same. Should they not be the same?

Form 5498-SA has a lower amount contributed than the W-2. I also had a corrected W-2, but Box 12 had no changes. I believe like the 5498-SA has the correct number, but I went with the W-2 for my tax return. I'd like to know what I should do.