In March of 2020, an Iowa security guard named Shane Saxen, 31, collected $1 million for five matching numbers on a Powerball ticket. When asked what he planned to do with the windfall, Saxen said he'd save it for retirement. That's not the sexiest answer you'll hear from a lottery winner, but it is a wise choice.

Here's why. If Saxen plans to retire at age 62, he has 31 years to benefit from compound earnings on his winnings. Let's say he walks away with about $551,000 after paying taxes and taking the lumpsum prize upfront. Invest that sum at a 7% average annual return for 31 years, and it grows to nearly $4.8 million before taxes. And that number sounds a lot more exciting than $551,000.

Cash raining down on man

Image source: Getty Images.

So, what should you do with a sudden cash windfall? Here are five steps that'll set you up for financial success.

1. Fill up your emergency fund

Even lottery winners need an emergency fund. Set aside enough cash in a high-rate savings account to cover six months of your living expenses. Then, forget about that money until something bad happens. Use it for the unexpected -- loss of income, healthcare expenses, car repair, or home repair.

2. Pay off debt

Next, pay off all credit card debt, personal loans, and student loan debt. The average credit card APR is 14.87%, and that can strangle your monthly budget if you're rolling over balances. Personal loans can be even more toxic, with rates as high as 36%. And student debt has more manageable rates, ranging from 4.5% to about 7%, but you might have much higher balances. If you have the cash, pay it all off and free yourself from the burden.

Next, evaluate where you are with car loans and mortgage debt. Because these liabilities usually carry low interest rates, experts often advise against paying them off early. Mathematically, it does make sense not to pay off these debts if you can earn higher interest rates by investing those funds. But there is an emotional benefit to owning your home and car, free and clear. That's a tough thing to quantify.

Think about what you'd do with the money if you didn't pay off your mortgage and car loan. If you are disciplined enough to invest in low-cost index funds or income-earning property, then do that. If you have a history of spending every last dime on hand, then send the money to your mortgage lender.

3. Create a budget

Having a budget is critical. Without one, you may be too relaxed about your spending and that can easily undermine your newfound wealth. Do an internet search for "lottery winners who lost it all" if you need some negative inspiration.

Your budget should account for your living expenses, plus contributions to your 401(k) and Health Savings Account or HSA. You may have a cash windfall, but that's no reason not to take advantage of retirement-related tax perks. 401(k) and HSA contributions are pre-tax. HSA withdrawals are fully tax-free when you use the funds for out-of-pocket healthcare expenses. And yes, lottery winners get sick too.

Making regular retirement contributions is like an insurance policy. You may have cash in the bank today, but there's no telling what could happen tomorrow. You just paid off your debts and you should have extra cash flow. There's no reason not to build more security into your future.

4. Splurge, a little

Now, for the fun part. If you're committed to a budget that includes savings contributions, go ahead and splurge a little. Limit your splurge to 5% of the windfall that remains after you've paid down debt. Choose something that will enhance your quality of life, but not something that will keep consuming resources. Boats, sports cars, and show horses are off limits.

5. Open a brokerage account

Finally, open a brokerage account to hold the remaining funds. You will owe taxes on any dividends, interest, and capital gains generated in this account. That's one of many reasons to follow a buy-and-hold strategy, which tends to be fairly tax-efficient. Reliable investment options include blue-chip stocks, tax-efficient funds, or low-cost index funds.

You can dream big, but spend small

A lottery win can have you daydreaming about driving Bentleys and Ferraris, or jet-setting around the world. But follow the lead of Saxen, and play the long game to secure your wealth. With some patience, you can turn a moderate cash windfall into a jackpot -- and secure a swanky retirement at the same time.