HSAs are the only type of account that offer a “triple tax benefit” for federal taxes – pre-tax savings, tax-deferred growth, and tax-free withdrawals. The account is intended to be used for current out-of-pocket health expenses, but investing and waiting to use the account later is even better!

https://www.troweprice.com/personal-investing/planning-and-research/t-rowe-price-insights/retirement-and-planning/personal-finance/getting-the-most-out-of-your-health-savings-account.html