Anyone familiar with Warren Buffett knows the famous investor likes Apple (AAPL 0.50%). He has called the company a better business than any of Berkshire Hathaway's subsidiaries and better than longtime Berkshire holdings American Express and Coca-Cola.

However, another company is attracting Buffett's attention even more these days: Occidental Petroleum (OXY 2.11%). Could Buffett like this stock more than Apple because of its once-in-a-generation opportunity?

Occidental's once-in-a-generation opportunity

The company has produced petroleum since 1920,  and it's been a long time since the oil business presented a massive shiny new opportunity for investors. But Occidental is pouring billions of dollars into an up-and-coming technology that could be another once-in-a-generation source of riches -- carbon capture and storage (CCS).

As its name indicates, CCS involves capturing carbon dioxide and storing it so it doesn't affect the atmosphere. It has become a hot area of development due to increasing concerns about the impact of carbon dioxide emissions on climate change.

Occidental is focusing on direct air capture (DAC), a type of CCS where carbon dioxide is removed from the air. It acquired DAC pioneer Carbon Engineering last year for $1.1 billion. The company plans to build up to 135 DAC plants.

What will Occidental do with all of the carbon dioxide sucked from the air? President and CEO Vicki Hollub wants to use much of it in oil production. Her goal is for "net-zero" oil where the carbon dioxide captured from the atmosphere cancels out the carbon dioxide emitted by burning the oil. The company has also already begun selling carbon credits to other companies.

ExxonMobil predicts CCS will be a $4 trillion business by 2050, and Occidental is one of the leaders in this nascent market. If the company's technology can be successfully scaled, Occidental could continue producing oil for decades to come without worries about its climate impact.

Does Buffett like Occidental more than Apple?

Buffett has expressed support for Occidental's carbon capture initiatives. But does he really like Occidental more than Apple? There are at least two reasons to think he might.

Most importantly, the legendary investor continues to aggressively buy shares of Occidental but sold nearly 13% of Berkshire's stake in Apple during the first quarter of 2024. Berkshire owns 28% of Occidental and has secured regulatory approval to acquire up to 50% of the company.

In his latest letter to Berkshire shareholders, Buffett listed eight stocks he expects Berkshire to "maintain indefinitely." Occidental was one of them, but Apple wasn't.

However, it's easy to argue that Apple remains Buffett's favorite stock. For one thing, the tech giant still makes up 39.7% of Berkshire's portfolio. That's nearly four times larger than the conglomerate's second-largest holding (Bank of America) and almost 10x the size of its position in Occidental. Buffett also said in Berkshire's recent shareholder meeting that Apple would likely continue to rank as the largest position.

Good picks for different reasons

Maybe Buffett likes Occidental more than Apple; maybe not. Either way, I think both companies are good picks for different reasons.

Carbon capture truly could present a once-in-a-generation opportunity for Occidental. I suspect the stock has significant upside potential, especially with Berkshire buying additional shares on a regular basis.

Apple could have yet another once-in-a-generation moment of its own with artificial intelligence (AI). The company is widely expected to introduce multiple AI innovations at its Worldwide Developers' Conference in June. I think it's possible Apple could enjoy a new supercycle of iPhone upgrades over the next few years, thanks to AI.