The HSA contributions reported in box 12 of your Form W-2 is not deductible on your tax return. That is because the funds that were contributed to your HSA are pre-tax. The amount is not included in your W-2 wages. Since it hasn't been taxed, you cannot deduct it.
As explained by The HSA Store The Deductibility of HSA Contributions:
Employer contributions to an HSA are not considered income, so they're not subject to income tax or payroll tax. If the employee makes contributions via a Section 125 salary reduction arrangement, those contributions are also considered employer contributions, meaning they're not subject to income tax or payroll tax; these contributions show up in Box 12, with Code W).
[Edited to add citation 02/16/25|11:15 pm PST]
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"