I had to teach my son to put his face in the water by myself. We did it at home in the tub and it took a while.
He had goggles on, a nose clip, and ear plugs at first and the water was warm.
I showed him how, with all those things on him, pouring water over his face wouldn't get into his eyes nose or ears. That was the first step! Then he was OK with the shower over is face (him in control of the shower.) . After a while he was willing to put his face in the water. I put coins on the bottom of the tub for him to pick up. Once he got up the courage to open his eyes under water (warm water in bath tub) it was like a light bulb went off and he got much more interested in swimming.
Gradually we reduced use of earplugs first, then nose plug. He still wore goggles all the time, still does now.
Eventually he was able to swim in a pool. We started at a pool during off hours, hotel pools, etc.
He finally learned to swim with a one to one coach but not until he was able to dog paddle and go underwater on his own with me. Didn't want to waste the money.