On many trips snorkeling and scuba diving is on the itinerary, and it’s fun when you can take photos of the process. While there are phone cases that can make your smartphone waterproof the risk is a bit high.
Getting some kind of an underwater camera is your best bet since it’s made exclusively for getting wet and if something happened you only lose the photos that you took and nothing else.
If you’re shooting with a DSLR camera there are also waterproof bags that you can place and secure the camera into. Many of those will work up to 16 feet deep and still take clear photos despite having the plastic over the lens.