Hoping to win the $1.35 billion Mega Millions jackpot? Take these 3 steps to prepare for any cash windfall

Getty Images | Silvia Cozzi

Whether it's $5 from a lottery scratch-off or a couple thousand dollars from a tax refund, unexpected money is usually a welcome event for people on any budget.

While that cash can sometimes be a lifeline to those who need to cover immediate bills and expenses, often it's a nice little boost that you may be tempted to use without caution or planning. 

Of course, the size of the cash windfall and your own financial situation may completely change how you decide to spend it. But in any case, having the right mindset around extra cash can help you avoid squandering the opportunity when it arises.

Sometimes you know a windfall is coming, like if you're expecting a decent tax refund. But other times, like a winning lottery ticket, it's a pleasant surprise.

In any case, here are three steps you can take to prepare for a cash windfall.

1. Write down your financial goals

It's always a good idea to set financial goals for yourself, from the long-term, like retirement, to the short-term, like getting out of credit card debt. And writing them down adds a layer of accountability that can help you stay on track. 

"If you get a windfall of $500 or $5,000, whatever the amount is, and you've never thought about your goals, it's very easy to use it for something that's very short-term," Kamila Elliott, a certified financial planner and member of CNBC's Advisor Council, tells CNBC Make It.

The windfall might not be enough to achieve your biggest financial goals, but no amount is too small to put toward your progress, Elliott says. Even when her clients are doing relatively well money-wise, Elliott challenges them to dream bigger.

"I ask, 'Do you see yourself continuing to work hard for the next 20 or 30 years?' and a lot of them say, 'No, I want to retire early.' Or, 'I'm doing this to make money and then at some point, I want to do what I love to do,'" Elliott says.

From there, she helps clients create goals that reflect their true passions, which often involve working or earning less or taking a big risk like starting their own business. Even if a windfall isn't life-changing in the moment, any extra dollar can help build those bigger dreams.

2. Turn happenstance into good habits

While you probably won't be able to make a habit out of finding $20 on the ground or getting lucky on a lottery scratcher, you can make a plan to allocate part or all of your extra cash toward your goals. 

"Building wealth isn't always about sums of money," Elliott says. "It's consistency in your behavior to save that money, too."

That can mean having a plan for all or part of your tax refund to go directly to your savings. Or instead of using all the cash you have before you get more, set aside the $5 bills and build up rainy day savings. 

Even little amounts, when growing continuously, add up over time, Elliott reiterates. 

"It may seem small now, but if you save this money every year for five, 10, 20 years, it's a large amount of money," she says. 

3. Spend intentionally

While your financial goals should remain top priority, it's OK to use a cash windfall for something fun like traveling or upgrading your car, Elliott says. But she encourages her clients to make sure they're spending on things that truly bring them joy.

That's because there are trade-offs when it comes to saving money, Elliott says. An extra $1,000 might get you a nice little vacation, but it could alternatively take you a step closer to your goal of retiring early or buying a home.

Ask yourself if that vacation is worth taking a longer time to save for the house or putting in extra work to give your home savings a boost.

"When you phrase it like that, people think, 'Does it really give me joy or am I just doing it to do it?'" Elliott says. "You don't want to save every single dollar and feel like you're working hard and you don't get any enjoyment out of it."

At the end of the day, it's your money, your life and your values. But having this framework in mind can make your goals feel more attainable and encourage you to stay the course on your way to achieving them. 

Sign up now: Get smarter about your money and career with our weekly newsletter

Don't miss: Mega Millions jackpot is up to $940 million—here's how much you'd actually take home in each state

How this 26-year-old earns and spends $25,000 a year just outside NYC
How this 26-year-old earns and spends $25,000 a year just outside NYC