My parents were of the throw them in the water and they'll learn to swim school of thought. I'd just have to be fished out before I drowned. When I had kids I wanted to develop at least a minimum level of competency in case I had to go after them some day. I still have some anxiety near the water and I'm not great at it, but I did manage to teach myself to swim.
This was my first "swim lesson" experience as well. Pretty horrifying and I still remember it. Thankfully my Mom was watching and she was not a fan of this method, and so that was my first and last lesson at that particular pool. She gave me many chances after that to forget that first horrible experience through more appropriate instruction. So if the first teacher isn't perfect in their vibe with you, please just try again with a different teacher. It takes many outings to become comfortable and competent.
One of the colleges I went to used to make all students either pass a basic swim test or take swim courses in college. I wish they still did that, but they've stopped.
So most of the people I know who learned to swim as adults have done so because they want to participate in triathlons. One of the drawbacks I see of that purpose, and of learning as an adult in general, is that kids naturally play and have fun in the pool. Propelling yourself through the water while timed is not actually that fun unless you are competitive like that. So I would encourage you to not only learn to stay floating, tread water, and move through water, but also try to have fun doing kid-based things like hand stands or hand springs under the water, somersaults in the water, etc. I can't do a handspring on land, but to this day I like to do them in a pool. Another thing to focus on is getting used to having water going into your nose and opening your mouth to exhale under water. I think that sensation of water in nose and mouth must be part of what causes such quick panic if one isn't used to it.
Sending good wishes your way!