My kid was in a very similar phase when we first started getting him into swimming at 5 -- he loved to play with and in the water, but absolutely refused to put his head into it. At the time, he went to CG Brown for public swimming lessons. There were 3 - 4 kids in total in his classes.
According to the older teenager instructor -- my guess is, he is in the 18 - 19 yrs old range -- they just need to get comfortable with the water. In my kid's case, he eventually aged out of the "afraid of putting his face into the water" phase -- although I'm sure seeing how other kids in his class are doing it gave him enough courage to give it a try. A pair of well-fitted swimming googles is also a must.
It should also be noted that we were only able to booked 3 or 4 rounds of public lessons, and the head-into-water breakthrough did not come until we took him to private lessons -- we went to Marina's Swim School:
https://marinaswimschool.com/
Marina was absolutely not cheap, and it felt pretty obvious to me that their staff were very much on the ball with reminding / encouraging you to keep registering for lessons with them. But it is also true that their instructional staff were very, very good. My kid swimming skills went up dramatically after 3 - 4 lessons with Marina, and continued to develop afterwards.
For his age group at the time, class size was also 3 - 4 kids (at Marina), but the Marina instructors were spending a lot more individual time with each kid, and I'm sure that made a difference too. I'm sure duration of the lessons also made a difference since public classes were only 1/2 hour, while the Marina classes were 1 hour each. With public lessons, by the time the kids got accustomed to the water again, it was probably almost time to leave again. With the hour long lessons, they have more time to build on the comfort level they've acquired.