The U.S. military struck three facilities in Iraq and two anti-ship missile sites in Yemen operated by Iranian-backed militias that have attacked U.S. personnel and ships in the region as the United States tries to keep the Israel-Hamas war from spilling over into a wider conflict.