Hawaii just banned 70% of common sunscreens that contain oxybenzone (the most common compound found in some 3,500 sunscreens worldwide) and octinoxate (which is even more toxic than oxybenzone but usually found in lower concentrations). Why? Because they are killing the coral reefs. Signed into law on July 2, 2018, and in full effect, as of January 2021, the majority of sunscreens currently being sold in Hawaii will be banned.
There are many ocean-safe sunscreens out there. Read the labels, the simpler the ingredients - the better, and choose waterproof lotions over sprays.
Also, it's important to note that Reef Safe or Reef Friendly claims on sunscreen labels are unregulated and therefore potentially meaningless. You really have to look at the ingredients and judge for yourself.