Health savings accounts (HSAs) are so popular these days, it's hard to believe they're not even 20 years old yet. But though they're pretty common, people's knowledge of how to squeeze the most out of them often lags a little behind. If you have an HSA or are eligible for one, here are five costly mistakes you don't want to make.

1. Not contributing to your HSA

It's smart to contribute to an HSA every year if you're eligible for one and can afford to do so. As long as you have a qualifying health insurance plan -- one with a deductible of $1,400 or more for an individual or $2,800 or more for a family -- you may set aside up to $3,650 if you have an individual plan or $7,300 if you have a family plan in 2022.

Serious person looking at laptop.

Image source: Getty Images.

These contributions reduce your taxable income for the year, and if you spend the money on medical expenses, it's tax-free. That's a benefit you won't find with any other retirement account.

If you struggle to remember to make contributions on your own, see if you can set up automated contributions. Remember to review your HSA plan every year. The government periodically raises the annual limits on HSA contributions, so you might be able to set aside more money in future years.

2. Not making catch-up contributions if you're eligible

Adults 55 and older can contribute an extra $1,000 to their HSA in 2022. This means they can contribute up to $4,650 if they have an individual health insurance plan or $8,300 if they have a family plan. If you're able to, you should try to set aside this extra cash to help your balance grow even faster.

3. Not investing your funds

Many HSA providers enable you to invest your funds to help the plan grow more quickly. Unless you plan to use your HSA money for a planned expense in the near future, investing is a good idea. It can turn your HSA into a nice supplement to your personal retirement savings.

If you invested $3,650 in your HSA every year for 10 years, you'd end up with about $52,300 if you had a 7% average annual rate of return, despite only contributing $36,500 yourself. The remaining $15,800 comes from investment earnings. And over time, this number will only get larger. 

If your current HSA provider doesn't enable you to invest your funds, you may want to seek out another provider that does. Be sure to investigate your investment options and fees before choosing a company to work with.

4. Spending your HSA funds on minor medical expenses

You're free to spend your HSA funds on whatever you want, but if you have a small medical bill, you might prefer to pay for it out of your own pocket so you can leave your HSA funds alone. This way, they'll stay invested so they can grow into an even larger sum over time.

There's nothing wrong with using your HSA funds to cover larger medical expenses. But if you consider your HSA to be another retirement account, step back and reevaluate your savings strategy after a big withdrawal. You might need to set aside more money in your HSA or another retirement account going forward to stay on track.

5. Spending your HSA funds on non-medical withdrawals while under 65

You can also use your HSA funds for non-medical expenses, but you will pay taxes on these. You'll also get slapped with a 20% early withdrawal penalty if you're under 65 at the time. This is stricter than the 10% early withdrawal penalty on those under 59 1/2 that most retirement accounts have.

You should avoid non-medical withdrawals under 65 at all costs -- and even once you're 65, you should only do this as a last resort. If you reserve the money for medical expenses, you won't have to worry about paying taxes on it at all, and people often require more medical care as they age. 

If you avoid the errors mentioned above, you can wind up with a pretty sizable sum in your HSA. But keep in mind, HSA rules might change over time, so be sure you're keeping up to date on any changes. This will ensure you don't miss out on opportunities to get even more out of your HSA.