Modern phones often use an IP rating to measure their relative water and dust resistance. Apple iPhones (from the iPhone 11 onwards) have an IP68 rating meaning that they should technically be able to survive in 1.5 meters of water for 30 minutes. The iPhone SE is the exception to this with an IP67 rating.
It’s important, however, to remember the difference between water resistant and waterproof phones. A water-resistant phone can withstand splashes of liquid and several minutes of submergence – but only waterproof phones can stay in deeper water for a prolonged period.
iPhones technically aren’t ‘waterproof’ but models from the iPhone 7 onwards are built to be water resistant to differing degrees. Make sure you review the specific model to see just how resistant it can be.