Oil prices have been on the upswing in recent weeks. West Texas Intermediate, the primary U.S. oil price benchmark, is up more than 20% in the past month to over $80 a barrel. That's after Saudi Arabia recently led a 1-million-barrel-per-day production cut.

Crude oil prices could continue rallying as demand picks up later this summer. Because of that, now could be a great time to buy oil stocksTotalEnergies (TTE -1.77%), Diamondback Energy (FANG -2.87%), and Devon Energy (DVN -2.18%) are three top ones to buy, according to a few Fool.com contributors. Here's why they think this trio of oil stocks stands out right now. 

Oil, gas, and electricity

Reuben Gregg Brewer (TotalEnergies): It's not easy being an integrated oil giant these days, as the clean energy shift has put material social pressure on this group of high-profile energy producers. ExxonMobil and Chevron have largely opted to stick to their carbon fuel focus. BP and Shell both loudly proclaimed that they would shift aggressively toward clean energy, with each cutting its dividend to help fund the transition. TotalEnergies said it would navigate a middle path, increasing clean energy, increasing carbon fuels (largely natural gas), and supporting its dividend.

A rebound in oil prices has been a particular benefit to Exxon and Chevron. But they risk falling out of line with global energy trends over the long term. BP and Shell, seeing huge oil and natural gas profits, chose to walk back their prior commitments and stick with carbon fuels for a bit longer to maximize profits. That makes them look bad to both ESG-focused investors and to shareholders who trusted them to navigate the changing energy market without having to switch back and forth between business plans. TotalEnergies stands alone as it continues to, basically, pursue the same balanced approach. In fact, it has announced plans to speed up its clean energy push, not pull back from it.

If you are looking for an energy major that is deftly changing its business as the world goes green, TotalEnergies is the name to watch. And investors can collect a generous 4.5% dividend yield along the way (U.S. investors will have to pay French taxes).

A cheap way to cash in on higher oil prices

Matt DiLallo (Diamondback Energy): Diamondback Energy expects to generate lots of excess cash this year. At $80 a barrel, around the recent price, the company can produce more than $3.3 billion of free cash flow. That works out to about $18 a share based on its current outstanding shares. With the company's share price recently around $145, Diamondback trades at 8 times free cash flow or a 12.4% free-cash-flow yield. That's extremely cheap. The S&P 500 trades at a 5% free-cash-flow yield, while the Nasdaq Composite's is around 4%.

Meanwhile, free cash flow will rise with oil prices. At $90 a barrel, Diamondback could produce over $3.9 billion of free cash or more than $21 per share. Its free cash flow will grow to more than $4.5 billion, or $24.50 per share, if crude averages $100 a barrel this year.

Diamondback Energy expects to return 75% of its free cash flow to investors this year via its base dividend, share repurchases, and variable dividends. Depending on how it divvies that cash, the company could pay a gusher of dividends this year. Meanwhile, if it allocates more capital to share repurchases, it could retire a meaningful percentage of its outstanding shares, given how cheap the stock is right now.

Diamondback Energy offers investors a compelling value proposition. It trades at a low valuation at current oil prices. Given its capital allocation strategy, it could richly reward shareholders this year through dividends and repurchases. Because of that, it looks like a great way to capitalize on the potential upside in oil prices.

Earn dividends no matter where oil prices head

Neha Chamaria (Devon Energy): Devon Energy stock rebounded off lows in mid-March, and much of that recovery is correlated to crude oil prices that have also ticked upward in recent weeks. Devon Energy, after all, is an oil and gas producer, and can therefore make money in a rising oil price environment. More importantly, investors in Devon can also expect bigger dividends as the company's cash flows grow.

Known for launching the industry's first fixed-plus-variable dividend policy, Devon Energy is a compelling oil stock to own. While it's true Devon's total dividend per share can fluctuate quarter after quarter thanks to the variable component that's pegged to cash flows and therefore oil prices, it is also true that the company pays a steady fixed dividend per share each quarter that's sustainable even at lower oil prices. In the fourth quarter, Devon even increased its fixed dividend by 11%.

That effectively means investors in Devon can expect big dividends when the company announces its quarterly numbers next month if oil prices continue to rally. Devon has a solid balance sheet, having generated record free cash flow (FCF) of $6 billion in 2022, backed by record oil volumes.

Devon isn't going ballistic though, and is targeting only up to 5% growth in annual oil equivalent production. While the moderate production growth can still hugely boost Devon's cash flows if oil prices rise, it should also save the company from nasty shocks if oil prices fall. It's a win-win strategy, one that eventually focuses on cash-flow sustainability and growth. And as long as the oil company continues to prioritize cash flows, investors can focus on returns and not have to worry about oil prices.