Big oil companies are continuing to reap the benefits of high commodity prices but aren’t backing off plans to reward investors while keeping production roughly flat.

Exxon Mobil Corp. said Friday it collected $5.5 billion in first-quarter profit, more than double the same period last year. The U.S. oil giant said it would triple its share repurchases, but will keep oil-field spending at a modest pace.

Chevron Corp. , the second-largest U.S. oil company after Exxon, on Friday said it made $6.3 billion in quarterly profit, its highest in almost a decade and up from about $1.4 billion in the same period last year. The company has paid out $4 billion to investors in dividends and share repurchases this year.

France’s TotalEnergies reported $4.9 billion in profit on Thursday, and said it could double its share buybacks this quarter. Other European energy giants, Shell PLC and BP PLC, will post first-quarter results next week and are also expected to report strong profits.

Exxon Chief Executive Officer Darren Woods said underinvestment in oil and gas during the pandemic tightened supplies ahead of Russia’s invasion of Ukraine in February, which injected uncertainty in global markets.

Despite favorable market conditions, Mr. Woods and Chevron CEO Mike Wirth gave no indication Friday they have changed their thinking on boosting production. Energy executives say that sustained pressure from investors to return more cash to shareholders is the primary factor holding back investment in growth.

“We haven’t stepped up our number of rigs,” Mr. Wirth said Friday. “We haven’t stepped up spending.”

To a lesser extent, cost inflation is also deterring production growth as shortages of equipment and labor have become widespread in the U.S. shale patch. Mr. Woods said Exxon is feeling the impact of cost inflation in the Permian Basin, the top U.S. oil field, but that it’s working to keep growing oil production there without exceeding the cost of oil supply.

Though oil prices have largely held above $100 a barrel, China is battling another outbreak of Covid-19, bringing prices down from the highest levels since 2008 and raising concerns the outbreak could dent economic growth and hurt global air travel. Mr. Woods noted margins on chemical products have fallen sharply in Asia, a potential sign of economic trouble.

Separately, U.S. economic growth fell at a 1.4% annual rate in the first quarter, the Commerce Department said this week, largely due to a widening trade deficit. Still, global oil supply growth has continued to lag behind demand.

Exxon’s production in the first quarter was down about 4% compared with the prior quarter. An Exxon gas station in Pennsylvania.

Photo: Rachel Wisniewski for the Wall Street Journal

“We anticipated this in 2020, with industry investment levels well below what was required to offset depletion,” Mr. Woods said. “That’s why we worked so hard to preserve our capital expenditures during the depths of the pandemic.”

Exxon’s net income was about 38% lower than analysts expected, according to FactSet. It took a $3.4 billion accounting charge after it decided to halt operations at its Sakhalin Island development in Russia’s Far East. Even so, the Texas-based company is planning to boost its $10-billion share-buyback program to $30 billion through 2023, a sign of confidence in its underlying financial health as energy demand rises, Exxon Chief Financial Officer Kathryn Mikells

said.

Total took a $4.1 billion accounting charge Wednesday on the value of its natural-gas reserves, citing impacts from the Western sanctions targeting Russia, and decisions by BP and Shell to exit their Russian investments are expected to weigh on their profitability.

Ms. Mikells, who joined Exxon last year as the company’s first CFO, cited the company’s “strong balance sheet and liquidity situation” as reasons it could boost its share repurchase program.

The company’s upstream earnings rose by $1.1 billion from the last quarter as oil and gas prices have surged following Russia’s invasion of Ukraine and as global demand continues to outpace supply growth.

SHARE YOUR THOUGHTS

What’s your outlook on the oil industry? Join the conversation below.

“Especially given today’s context and market environment, we’re working very hard to increase production of low-cost barrels consistent with our overall plan,” Ms. Mikells said, pointing to Exxon’s investments in Guyana, liquefied natural gas and the Permian Basin, where it is seeking to increase production.

Chevron said it aims to raise output in the Permian 15% from 2021 levels this year, an increase from its prior growth target.

But both Exxon and Chevron have said their companywide production will be roughly flat from last year’s levels or slightly down. Chevron’s U.S. output was up about 109,000 barrels of oil equivalent a day from the same period last year, while its international production was down 170,000 barrels a day. Exxon’s overall production in the first quarter was down about 4% compared with the prior quarter due to weather and other factors.

Chevron also missed analysts’ estimates on earnings, with net income coming in about 4.5% lower than anticipated, according to FactSet.

Exxon and Chevron’s shares were down slightly in Friday afternoon trading.

Even with oil fetching more than $100 a barrel, and pressure from the Biden administration for oil companies to pump more to help ease high gasoline prices, investors have continued to push companies to remain frugal when it comes to oil-field investments. Instead, shareholders are seeking increases to dividends and buybacks after years of losing money on the sector.

Kevin Holt, senior portfolio manager at Invesco Ltd. , said he doesn’t want oil companies to make spending decisions based on current commodity prices, which he said will eventually decline.

“We want to make sure you stay disciplined and look at mid-cycle pricing, in terms of how you’re looking at the world,” Mr. Holt said, referring to oil prices still several years away. “That’s first and foremost.”

Exxon said it spent about $4.9 billion in capital in the first quarter, on pace with its plan to keep investments relatively modest—and far lower than the last time oil prices fetched more than $100 a barrel. Back then, in the first quarter of 2014, Exxon had invested $8.4 billion.

The company last year set a conservative budget of $20 billion to $25 billion per year through 2027, 17% to 33% lower than prepandemic plans.

Exxon generated about $10.8 billion and Chevron about $6.1 billion in free cash flow, a metric that has become of particular interest to investors after years in which U.S. oil companies made lackluster returns as they consistently overspent cash flow.

For about a decade, many companies ran up huge debt piles and spent more money than they made from actually selling oil and gas, in a bid to increase production. Since the pandemic, companies have pulled back spending and focused on sending extra cash to investors.

Oil companies are now deciding how to spend growing piles of cash. Many shale companies have opted to send most of it back to shareholders via flexible dividends and buybacks; a few have said they would increase spending and output to some extent.

For Exxon, share repurchases have become key to its efforts to lure back investors, but some on Wall Street would like to see the Texas-based company reduce its debt further, at what may be a high point for oil prices, said Ryan Todd, an analyst at Piper Sandler. Exxon said its debt-to-capital was within a target range of 20% to 25%.

“There’s been increasing shareholder pressure on companies to position themselves so they’re more resilient through the [commodities] cycle,” Mr. Todd said, noting that large oil companies tend to repurchase shares when they have extra cash and their stock prices are high.

Write to Collin Eaton at collin.eaton@wsj.com