Though the pandemic isn't over, people haven't been rushing out to get coronavirus vaccines these days. This spring, the international public health emergency came to an end, and it looked as if we soon would be entering a post-pandemic situation. At the same time, market leaders Pfizer (PFE 0.55%) and Moderna (MRNA 1.69%) reported drastic declines in vaccine sales -- and the companies' stock prices remained in the doldrums.

The coronavirus clearly isn't as widespread as it was during the early days of the health crisis. But in recent weeks, cases started to rise again.

Pfizer and Moderna have predicted the virus will follow that of the flu, peaking seasonally -- and spurring people to go for annual vaccinations. And the companies' investments in their coronavirus programs show they believe this is a market that could generate revenue growth over the long term.

Should investors start buying vaccine stocks? Let's find out.

The highest test positivity in more than a year

First, we'll consider the current coronavirus environment. The Centers for Disease Control and Prevention (CDC) has collected data on U.S. cases and hospitalizations since early in the crisis. The most recent numbers show test positivity at more than 14%, the highest since February of last year. And coronavirus hospitalizations climbed more than 18% in the week ended Aug. 19 from the previous week.

Meanwhile, Pfizer, Moderna, and smaller rival Novavax (NVAX 3.54%) have prepared their updated shots for the fall vaccination season and await a nod from the U.S. Food and Drug Administration and recommendations from the CDC before they can launch. Using the flu as a model, the vaccination season generally starts in September, and health experts often recommend getting a jab by late October.

Now let's take a look at the commercial side of the story. These companies still hold government contracts for the delivery of doses, but the environment is transitioning. As we move toward a post-pandemic world, the companies will sell directly to healthcare providers instead of governments. This already has begun.

In Moderna's latest earnings call, the company said it has negotiated deals with retail pharmacies, wholesalers, group purchasing organizations, and others and expects to sign new agreements in the coming months, adding to sales. The company predicts vaccine sales of $6 billion to $8 billion this year.

Pfizer leads the market

Pfizer, as market leader with 65% share right now, forecasts revenue of $13.5 billion for its coronavirus vaccine this year. The pharma giant also is a leader in the coronavirus treatment market and expects its product -- Paxlovid -- to bring in $8 billion this year.

These numbers still are significantly lower than Moderna's and Pfizer's vaccine sales last year, when the products generated more than $18 billion and $37 billion in sales, respectively. But it's important to remember two key things.

First, a pandemic situation -- thankfully -- doesn't last forever. And that means the extraordinary revenue opportunity won't last forever, either. So it's normal that Moderna and Pfizer have reported a drop in vaccine sales.

Second, as we see from recent data, the coronavirus isn't completely disappearing. That means these companies still could generate significant revenue from their vaccines over time.

Let's get back to our question: Should you buy vaccine stocks today?

Even at the start of the pandemic, I wouldn't buy a company just for its vaccine if the rest of the portfolio looked weak. That would represent a short-term bet, which always is risky. It's best to favor long-term investments, or those that could deliver over a period of years -- and if they also offer you some rapid gains in the meantime, that's a bonus.

The reason to buy

Right now, I would buy shares of Pfizer and Moderna for the potential of their coronavirus vaccines and the rest of their portfolios.

Moderna aims to create a billion-dollar respiratory vaccine portfolio by the end of the decade. And Pfizer is in the process of bringing a whopping 19 new candidates or indications to market in less than a two-year period. So revenue opportunities aren't limited to the vaccine. I would be more cautious about Novavax, as it's struggled to keep up with the vaccine leaders, and its pipeline isn't as broad.

The uptick in coronavirus cases could push more people to get vaccinated -- and that may encourage healthcare providers to increase vaccine orders. I wouldn't expect this to result in a major surge in sales for Pfizer or Moderna right away. But it could show us that coronavirus vaccines aren't just pandemic products and may continue to grow earnings for vaccine makers over time.