The competition in retail pharmacy is intense. That's especially true between the two biggest players in the market -- CVS Health (CVS -0.65%) and Walgreens Boots Alliance (WBA -1.18%)

Neither of these stocks has been a winner for investors over the last 12 months. But which is the better pick going forward? Here's how two Motley Fool contributors think CVS and Walgreens stack up against each other. 

Brighter days could be ahead

Keith Speights (CVS Health): Sure, CVS Health hasn't made shareholders very happy lately. The stock is down close to 25% over the last 12 months, with nearly all of the decline coming so far this year.

However, this makes CVS an absolute bargain for income investors. Its shares currently trade at a forward earnings multiple of 8x. The healthcare giant also offers a dividend yield of over 3.4%.

The future should be brighter for CVS Health than its recent past. For one thing, the company plans to sell its Omnicare long-term care pharmacy business. This unit has served as a drag on growth for years. 

CVS also completed two key acquisitions. It closed on the purchase of healthcare technology and services company Signify Health in March 2023. A little over a month later, CVS closed on its acquisition of primary care provider Oak Street Health. These deals continue CVS' expansion into the broader healthcare sector and give the company new growth opportunities. 

Meanwhile, CVS is becoming an even bigger force in the retail pharmacy market. CEO Karen Lynch noted in the first-quarter conference call last month, "Our growth in the retail pharmacy is notable and has resulted in significant market share gains over time."

CVS Health's healthcare benefits segment, which features its Aetna insurance business, also continues to grow. In the latest quarter, the segment's revenue jumped more than 12% year over year. 

A potential new growth driver

Adria Cimino (Walgreens Boots Alliance): Walgreens hasn't exactly delivered growth to investors over the past several years. In fact, the company's earnings and stock performance have been disappointing. But a bargain stock price and a potential new growth driver could make Walgreens a recovery story.

So, what's this potential growth driver? Primary care. Walgreens back in 2021 made an investment of more than $5 billion in VillageMD, increasing its ownership to more than 60% as part of its expansion into this area.

Primary care is a $1 trillion -- and growing -- industry. Walgreens set a goal for more than 600 VillageMDs at Walgreens practices by 2025 and 1,000 by 2027.

Of course, Walgreens will face rivals from various angles. People are turning more and more to telemedicine, for example. And that means they may rely on a company like Teladoc Health -- no matter where they live. There's also competition coming from physical doctors' offices. Amazon recently completed its acquisition of One Medical to get in on the primary care market. This deal offers Amazon 200 physicians' offices throughout the country.

Still, Walgreens may have the upper hand as it faces these competitors. Importantly, more than 75% of Americans live within just a few miles of a Walgreens. So, the company clearly could gain significant share in those areas. And more than half of Walgreens' VillageMD practices set to open in the coming years will be in areas without easy access to primary care.

All of this means primary care could indeed be the growth driver that Walgreens -- and its investors -- need right now. At the same time, Walgreens shares, even considering the lack of growth so far, look cheap. They're trading at 6.9 times forward earnings estimates, down from more than 10 a year ago.

And it's important to remember this too: Walgreens still brings in billions of dollars in earnings each year. And with its potential growth in primary care, that could lead to an interesting recovery play for investors who buy a few shares right now.

Better buy?

Walgreens beats CVS in several ways. It offers a higher dividend yield. Its forward earnings multiple is lower. 

On the other hand, Wall Street thinks that CVS has stronger growth prospects over the next few years. The company also offers more diversification across the healthcare sector than Walgreens does.

Which is the better pick between these stocks? It depends on what investors prioritize the most among income, valuation, and growth.