Investing your hard-earned money can be daunting, and those picking stocks know how much time and effort can go into such an endeavor. However, over the long term, investing in the stock market is one of the best ways to combat inflation and grow one's nest egg for retirement. 

Right now, those with a spare $20,000 kicking around have difficult questions to ask. It's not 2021 anymore, when bonds earned essentially nothing and there weren't any viable alternatives to the stock market. Short-term Treasury yields are now above 5%, meaning there's (finally) a reasonable alternative to equities for savers.

There's no shame in taking a risk-free yield of more than 5% for a few months and waiting out what could be a volatile market this year. I recently bought my first ever bond (a six-month Treasury) for this reason.

That said, I'm still mostly in stocks for the long haul. These two companies are both ones I believe in for the long term, and own (or will likely own) moving forward. 

Let's dive in.

Meta Platforms

One stock I've owned for some time is Meta Platforms (META -0.52%). Formerly Facebook, Meta is a company that's pushed past its social media origins toward what CEO Mark Zuckerberg views as the future. 

I'm no oracle, and my crystal ball is broken. Maybe the metaverse is the future. Meta changed its name and is apparently staking its future on this concept, meaning investors are implicitly buying into this thesis by buying this stock.

However, Meta's long-term metaverse plans aren't the reason I own this stock. This is a cash flow-producing behemoth, with solid fundamentals and a trailing price-earnings ratio that's under 20. I honestly never thought I'd see such a valuation, but here we are.

There's a reason for why Meta's stock price has declined to a level where this valuation is possible. The company's revenue has declined on a year-over-year basis (albeit by 4%), and its operating income nearly halved to "only" $6.4 billion. With the digital ad market softening, there are obvious calls for this stock to see these trends continue. 

However, there's also a reason why this stock has surged nearly 50% this year alone. Investors like the cost-cutting efforts at the company, as well as the $40 billion increase in the company's share buyback authorization.  

Meta remains a dominant player in the social media sector, with a cash hoard and operating income levels ($29 billion in 2022 alone) that support a much higher valuation. Right now, the stock is a "show me" story. But historically speaking, Zuckerberg has shown he knows what he's doing. I think the fact that he's taking his cue from the markets and slimming down the company's spending is a step in the right direction. Over the long term, this is a company I think will continue to outperform.

Nvidia

Nvidia Corporation (NVDA -3.33%) is perhaps the top stock on my watch list right now. While I'm not currently in this stock, like Meta, its valuation has fallen to levels that appear attractive for the long-term, at least in my view.

A leader in producing high-end graphics processors and related technology, Nvidia is the backbone of many key industries that are booming right now. Whether we're talking about artificial intelligence or autonomous driving, Nvidia chips are ubiquitous in these high-growth areas of the economy.

Thus, an investment in Nvidia stock is really an indirect investment in the anticipated future growth of these sectors and others. Those bullish on a tech-driven economy for the next decade or two really can't go wrong owning Nvidia stock at these levels.

That said, like Meta, there's a reason why Nvidia is trading where it is. The company's exposure to crypto mining and other segments of the economy that have taken a hard hit over the past year (such as gaming) have hurt its medium-term outlook. 

Thus, this is a stock I really think represents the long-term bull vs. bear argument when it comes to high-tech stocks. 

Conclusion

Those with $20,000 to put to work now have options. These companies are two great options for long-term investors to put their capital to work in fundamentally sound tech behemoths that are well-positioned for future growth.

Now, growth can't be assured, and higher interest rates mean less capital may flow into these stocks in the near term. For those with a sufficiently long investing time horizon, that's OK. The greater the dip, the greater the buying opportunity. 

That's how I'm approaching these two companies right now.