Investing in top COVID-19 vaccine maker Pfizer (PFE -1.05%) seems like it should have made you rich if you bought the stock in March 2020. However, you might be surprised with its performance since then. While you would have netted a decent profit, it may not be as much as you expected.

Here's a look at how the stock has done over the past few years, and whether it's a buy right now.

Pfizer's stock gains of late were below average

On March 2, 2020, Pfizer's stock was selling for $33 a share. If you had invested $25,000 into the business then, you would have been able to acquire approximately 758 shares of the company. It wouldn't be until nine days later that the World Health Organization would declare a COVID-19 pandemic. It would be nearly a year before Pfizer had an approved COVID-19 vaccine, which was produced in partnership with BioNTech.

Today, the healthcare stock trades at around $40 per share. That means those 758 shares would now be worth roughly $30,300, for a return of 21%. By comparison, the S&P 500 rose by 28% during the same time frame, while the stock of rival vaccine maker Moderna soared nearly 400% in value.

Why didn't Pfizer's stock perform better?

Pfizer's top and bottom lines benefited from strong demand for its COVID-19 vaccine, called Comirnaty, and its oral antiviral treatment, called Paxlovid. The two treatments helped Pfizer generate more than $100 billion in sales last year, which was a record-setting performance for the business.

PFE Revenue (Annual) Chart

PFE Revenue (Annual) data by YCharts

A big reason why Pfizer's stock price likely didn't take off in value despite its strong results was that the company's market cap was already close to $200 billion in 2020. While COVID-19 did boost its top line in 2021 and 2022, unless investors expected the gains to be permanent, it would be hard to justify paying a premium for a boost that may only prove to be temporary.

Moderna, meanwhile, was still an up-and-coming growth stock and its COVID-19 vaccine put it on investors' radars. Even with its significant rise in value, its market cap of $57 billion is a fraction of Pfizer's size. 

The business is evolving

Pfizer's overall business is in the midst of a transition at the moment as it looks past its COVID-19 vaccine and oral treatment. Neither medication is likely to be a significant source of revenue for the business in the future as the pandemic gradually comes under control. As a result, Pfizer's revenue is expected to decline this year. The company forecasts overall sales of no more than $71 billion for 2023. The drop is related to slowing sales of its COVID-19 treatments, but also because some of its top-producing drugs will lose patent protection in the years ahead.

Management says it plans to fill that void through its pharmaceutical development pipeline and through mergers and acquisitions, with the most recent being its plan to buy cancer company Seagen for $43 billion.

Is the stock a better buy today?

Pfizer's stock is trading at a forward price-to-earnings multiple (which is based on analyst expectations) of 12, which is well below the healthcare average of 17, so investors are getting compensated for some of the risk and uncertainty involved with owning the healthcare stock. But with 23 phase 3 trials ongoing and the company still likely adding to its pipeline through acquisitions, the risk isn't terribly high. Buying the stock today and taking advantage of its high dividend yield of over 4% could be a great move for long-term investors.