Moderna (MRNA -1.39%) was one of the best stocks to own last year as it brought its COVID-19 vaccine to market and generated billions in revenue. The company, which was a bit of an unknown before the pandemic began, has quickly risen in popularity. And even though its shares have been declining this year, they're still up a whopping 766% since 2019.

But what if you bought the stock roughly two years ago today, after the company's vaccine was already approved? And more importantly, is the stock still a good buy now?

Investing in Moderna two years ago would have doubled your money

Two years ago, health officials weren't administering Moderna's COVID-19 vaccine yet -- the Food and Drug Administration didn't grant it Emergency Use Authorization (for people 18 years and older) until December 2020. The FDA has since expanded authorization to cover children as young as six months.

However, by the end of June 2020, the stock was already rising with shares trading around $64; at the start of the year, the stock was worth less than $20. At $64 per share, a $10,000 investment would have enabled you to buy roughly 156 shares. Today, that investment would be worth close to $20,600, for a return of 106%. 

It would be a bittersweet return given that in September 2021, the stock surged to more than $450 after Moderna unveiled a COVID-19 booster that included a flu shot. But ultimately, as a COVID stock, Moderna's value has risen along with increasing case numbers and growing concerns about the pandemic. Unsurprisingly, amid a return to normalcy, its shares have fallen 48% this year, performing worse than the S&P 500, which is down by just 21%.

Has the stock become a cheap buy?

If you're looking at earnings multiples, you may be inclined to think that investors are missing a huge opportunity. At a forward price-to-earnings (P/E) multiple of less than five, Moderna looks incredibly undervalued; the average stock in the Health Care Select Sector SPDR Fund trades at close to 15 times its future profits.

But investors should remember that future earnings rely on the accuracy of analyst estimates. And even though Moderna may still perform well over the next 12 months, it's the uncertainty afterward that likely has investors discounting the stock right now. While Moderna reported an incredible $18 billion in sales for 2021, before the pandemic, the company's revenue was declining and in 2019 totaled just $60 million.

MRNA Revenue (Annual) Chart

MRNA Revenue (Annual) data by YCharts

There will likely be a significant decline in revenue for Moderna next year unless a resurgence in COVID-19 cases renews demand for vaccines and/or boosters. And that means a much smaller bottom line and a higher P/E multiple, effectively eliminating today's bargain.

The stock has become a contrarian pick

If you're investing in Moderna today, you have to be comfortable taking on some risk. The company does have products in its pipeline that could replace some lost COVID-19 revenue -- but not all of it. One of its most promising products is mRNA-1647, a vaccine for the cytomegalovirus. That's in phase 3 trials and the company projects that at its peak, it could bring in up to $5 billion in annual revenue.

That peak could be years away, and that revenue wouldn't come anywhere near the money Moderna is making from its COVID-19 vaccine now. The good news is that Moderna has more than $10 billion on its books in cash and short-term investments that it can use to acquire a company (and now may be a great time amid falling valuations). But if Moderna doesn't make a big move, the uncertainty could deter investors from buying the stock. 

Moderna isn't the red-hot buy that it was a few years ago. Investors buying the healthcare stock today face the reality that it could continue to decline for the foreseeable future, at least until its growth prospects improve.