Maybe retirement is just a handful of years away. Or maybe you're not planning to leave the workforce for another two or three decades. No matter which scenario applies to you, the coming year is full of opportunities to set yourself up for a secure future. Here are three goals for 2021 that will pay off once your career comes to an end.

1. Read up on Social Security

Many people are clueless about how Social Security works. That causes them to make poor decisions both during their working years and in their senior years. Next year is a good time to commit to learning more about the program. Find out how you can estimate your benefits, how those benefits are calculated, and what options you have for growing them so you get more money once you're retired. A little legwork in the coming year could really pay off down the line.

Smiling older person sitting outdoors.

Image source: Getty Images.

2. Get as close as possible to maxing out your retirement savings

Your retirement isn't going to pay for itself, and while Social Security will help, you'll need independent savings to ensure you're able to cover your senior living expenses. That's why one goal of yours should be to sock away as much as you can manage in an IRA or 401(k) plan.

In 2021, you can contribute up to $6,000 to an IRA if you're under 50, or up to $7,000 if you're 50 or older. If you have a 401(k), your maximum contribution for 2021 is $19,500 if you're under 50, or $26,000 if you're 50 or older. Now clearly, there's a huge gap in contribution limits between these two accounts. Maxing out an IRA may be doable, but maxing out a 401(k) is obviously a lot trickier. The key is to push yourself to do the best job you can.

3. Fund an HSA if you're eligible

With a health savings account (HSA), you can set aside funds for healthcare expenses that can be withdrawn immediately or carried into the future. In fact, while an HSA is not a retirement savings plan per se, it's easy to treat it as one, because you have the option to carry that money all the way into your senior years, when your healthcare expenses are likely to be highest.

HSA participation eligibility hinges on enrollment in a high-deductible health insurance plan. In 2021, that's defined as an individual deductible of $1,400 or more, or a family level deductible of $2,800 or more. If you qualify, you can contribute up to $3,600 to an HSA in 2021 on your own behalf, or up to $7,200 if you're funding an HSA on behalf of a family. And if you're at least 55, there's a catch-up contribution of $1,000 you can make as well.

Many people will no doubt be focused on their personal economic recovery in 2021 followed an extremely volatile 2020. But if you're able to focus on retirement in the coming year, it pays to do so. Setting and achieving these goals could put you in a really strong position to retire on time and enjoy your senior years to the fullest.