Growth stocks didn't see much growth in 2022 thanks, in part, to a hawkish Federal Reserve that kept raising interest rates to control inflation as well as macroeconomic factors such as slowing consumer demand and fears of a recession in 2023. But the sharp decline in share prices for some solid companies did create an opportunity for investors looking to set their portfolios up for long-term success.

After all, the bear market isn't going to last forever. That's why investors would do well to buy some beaten-down growth stocks at relatively attractive valuations right now, especially ones that stand to gain from long-term secular opportunities.

CrowdStrike Holdings (CRWD -1.82%) and Meta Platforms (META -1.12%) are two such growth companies that investors may want to buy right now and hold on to for a long, long time. Let's look at the reasons why.

1. CrowdStrike Holdings

CrowdStrike Holdings stock is down nearly 49% over the past year. This crash gives new investors an opportunity to buy into an expanding company that could sustain its impressive growth for a long time thanks to the increasing demand for cybersecurity solutions.

In 2004, global cybersecurity spending stood at just $3.5 billion. But the growth in connected devices such as smartphones, data centers, cars, and even factories led to a huge jump in cybersecurity demand over the years. By 2025, global cybersecurity spending is expected to jump to $459 billion, as compared to the 2022 estimate of $262 billion. Looking ahead, the advent of self-driving cars and concepts such as the metaverse should amplify the need for organizations and individuals to spend on cybersecurity solutions.

This explains why the World Economic Forum expects global cybersecurity spending to hit $1 trillion annually by 2035. CrowdStrike is already taking advantage of the lucrative cybersecurity market. The company's revenue in the first nine months of 2022 has shot up 57% over the prior-year period to $1.6 billion. The reason why CrowdStrike is growing at a faster pace than the market it operates in is that it is focusing on the cloud security space.

The company estimates that its total addressable market (TAM) could hit $76 billion in 2023 and grow to nearly $98 billion by 2025. CrowdStrike also projects a TAM worth $158 billion in 2026, which includes the organic growth of its end market as well as future initiatives and the company's product roadmap. As CrowdStrike has generated just over $2 billion in revenue over the trailing 12 months, it looks like it's scratching the surface of a massive growth opportunity.

Not surprisingly, analysts anticipate annual earnings growth of nearly 59% from CrowdStrike over the next five years. It wouldn't be surprising to see it sustain such solid growth beyond the next five years as well considering the secular growth potential of the cybersecurity space. As such, investors may want to make the most of any opportunities to buy CrowdStrike stock.

The company currently sports a price-to-sales ratio of 12. Though that's expensive compared to the S&P 500's sales multiple of 2.3, investors should note that CrowdStrike is trading at a cheaper valuation compared to 2020 and 2021 when it had sales multiples of 60 and 36, respectively. Moreover, CrowdStrike's rapid growth indicates that it can justify its rich valuation, which is why it may be a good idea to start accumulating this cybersecurity stock while it is still beaten down.

2. Meta Platforms

After a terrible year in which social media giant Meta Platforms stock lost close to two-thirds of its value, investors can now buy it at a cheap valuation. Meta is trading at 2.8 times sales and 11.5 times trailing earnings. These numbers represent a discount to the company's five-year price-to-sales multiple of 8.6 and earnings multiple of 26.

But investors may be worried about buying Meta Platforms at this valuation given the headwinds that it is facing. Analysts estimate that Meta's earnings fell nearly 34% in 2022 to $9.08 per share, while its top line could have contracted in the low single digits. Meta has been hamstrung by a weak digital advertising market, as well as foreign currency headwinds. For instance, the company witnessed a whopping 18% year-over-year decline in the average price per ad in the third quarter of 2022.

But savvy investors might want to consider looking past this weakness, as Meta's fortunes should turn around in the long run. That's because digital ad spending is expected to pick up the pace in the future following 2022's slowdown.

It is estimated that digital ad spending increased by 8.6% in 2022 to $567 billion, according to eMarketer. The market is expected to accelerate in the next couple of years and hit $696 billion by 2024, an increase of nearly 23% from 2022. More importantly, digital ad spending is expected to be strong in the long run and hit $1.25 trillion annually by 2030.

Meta Platforms is in a solid position to take advantage of this opportunity thanks to a massive user base that's still growing. The number of monthly active people across the company's family of apps was up 4% year over year in the third quarter of 2022 to 3.71 billion. Not surprisingly, Meta is one of the two companies that dominate the digital ad landscape, the other being Alphabet's Google.

Meta generated $82 billion in advertising revenue in the first nine months of 2022, which points toward potential annual revenue of $110 billion based on the quarterly revenue run rate. Based on 2022's estimated digital ad spending of $567 billion, as discussed above, Meta controls nearly a fifth of the global digital ad market.

The company's massive user base should help it sustain its solid position in the digital ad market in the long run, and that should translate into impressive growth. With Meta Platforms stock trading at a dirt-cheap valuation right now, investors have a great opportunity to buy the stock on the cheap. They may not want to miss such an opportunity given the healthy long-term prospects of the market that Meta operates in and its ability to tap the same thanks to its nice share of the same.