Shale producers stand to benefit from the oil-market volatility unleashed by Thursday’s attack on two oil tankers in the Gulf of Oman, as U.S. companies vie with the Organization of the Petroleum Exporting Countries for global market share.

The incident near the Strait of Hormuz, through which one-third of the world’s shipped oil passes, highlights the risks associated with delivering oil from the Persian Gulf. Higher insurance and shipping costs could crimp margins for oil producers in the region compared with those in more...