ARLANDASTAD, Sweden—Western defense officials worry that with Israel going to war as the West battles Russia by proxy in Ukraine, there won’t be enough artillery shells and other weapons to keep both allies in the fight.

The issue is concerning NATO planners even though Israel isn’t a member of the alliance and few European countries supply it with military equipment.

But the North Atlantic Treaty Organization and its European members are deeply invested in supporting Ukraine against Russia’s invasion, and the prospect of two hot wars potentially consuming arms and equipment from the same stockpiles or supply chains is starting to worry officials.

“Of course” there are concerns about competition for military resources because of limited production capacity, said Göran Mårtensson, director general of the Swedish Defense Materiel Administration, which handles procurement for the country’s defense ministry. “There will be more need for that limited production capacity in Europe and the U.S.”

Mårtensson spoke on the sidelines of the NATO Industry Forum, an occasional event assembling government officials, military brass and industry executives that this time drew more than 800 attendees. Sweden hosted the meeting as a candidate for NATO membership and hopes soon to become a full member.

Since Russia launched its large-scale invasion of Ukraine roughly 20 months ago, defense contractors across the West have geared up production, but output remains below the volumes of ammunition and equipment being spent on Ukraine’s battlefields.

NATO members’ defense industries lack sufficient spare capacity to react to crises like now, alliance Secretary-General Jens Stoltenberg told the forum. “We need more of that to ensure that we have the production when we need it.”

Most companies are producing as much as they can within their existing production facilities and the next step would be new investments, said Esa Rautalinko, chief executive of Finnish armaments group Patria. Bringing new facilities online can take from two to five years, he said.

With demand increasing faster than production, prices of some supplies have soared. NATO-standard 155-millimeter artillery shells, one of the West’s most basic armaments, had cost governments about $2,100 apiece before Russia’s invasion of Ukraine last year, said Dutch Admiral Rob Bauer, Stoltenberg’s top military adviser, at the NATO forum.

The price of those shells, which Bauer dubbed “one of the most coveted objects in the world right now,” has increased fourfold, to about $8,400, he said.

Politicians have called on defense companies to expand capacity and accelerate output.

“If I were the industry, I would read the room and increase production,” said Estonian Prime Minister Kaja Kallas, in Brussels.

Industry officials say they need assurances that demand won’t drop at the cessation of hostilities, undercutting companies’ investments, as has happened in the past.

“Both sides need to loosen the mutually destructive chokehold and stop waiting for the other to move first,” Bauer said.

The U.S. has begun moving in recent months by pumping billions of dollars into retooled factories to produce more rockets, missiles, shells and rocket motors. It has issued almost $25 billion in contracts to arm Ukraine and replenish U.S. stocks.

Bill LaPlante, the Defense Department’s acquisition chief, has called in recent weeks for European countries to sign more contracts to encourage industry.

European governments have placed some orders, but not on the Pentagon’s scale. The European Union in the spring pledged to provide Ukraine with one million artillery shells within one year, but is behind on that target, Kallas said.

Sweden and three other Nordic countries earlier this month announced a rare multicountry order for 155mm shells for Kyiv, valued at roughly $54 million. At the prices NATO’s Bauer cited, that would deliver fewer than 7,000 rounds.

Mårtensson at the Swedish procurement agency, which led the order, said it could expand or add countries.

European governments’ call for industry to shoulder investment responsibility before signing contracts is misguided, Patria’s Rautalinko said. “We can’t do that without a vision of long-term demand—this isn’t retail,” he said.

Adding to uncertainty, he said, pressure from the Middle East conflict hasn’t yet filtered through to Europe’s defense-industry debates. Europeans might see the fight as more of an issue for Israel and the U.S., he said, but that would be a mistake.

“Everything is connected,” he said. “If Israel is helped out from the U.S. stockpiles, that’s taken away from something.”

Different armaments are being used in the two conflicts so far, but that could change if hostilities spread around Israel.

The U.S. is by far the largest supplier of military equipment and funding to Israel, though Germany is also a big provider, according to the Stockholm International Peace Research Institute.

Executives from Lockheed Martin, RTX, Boeing and others were at the NATO event, and combined have hundreds of employees in Israel. They are working on joint ventures such as Israel’s Iron Dome missile defense system.

General Dynamics, the biggest U.S. artillery shell producer, said it expects the Israeli conflict to boost demand already elevated by Ukraine.

“The biggest one to highlight, and it sticks out, is on the artillery side,” said Chief Financial Officer Jason Aiken of the recent $106 billion supplemental funding request from the White House, which includes further support for Ukraine and Israel, as well as Taiwan. “The Israeli situation is only going to put upward pressure on that demand.”

The Pentagon has sent back to Israel stocks of its shells relocated this year to replenish U.S. forces in Europe, a senior defense official said this week.

Boeing rushed shipments to Israel at the start of the latest conflict, including its small diameter bombs and joint direct attack munition kits that turn them into more precise weapons. Normally, these would be sent by sea, but these came from existing Israeli orders and were flown over.

General Dynamics said it has been able to boost production of artillery shells and other munitions faster than expected, boosted by Pentagon investment in new facilities. The company is targeting annual production of one million shells, a fivefold increase.

Sales at its combat unit, which employs more than 2,000 staff in Europe, had been expected to be flat at best this year. They are up 15% so far this year, stoked by orders for shells, as well as for armored vehicles and military bridges. “Frankly, we don’t see that demand signal slowing down,” Aiken said.

Write to Daniel Michaels at Dan.Michaels@wsj.com and Doug Cameron at Doug.Cameron@wsj.com