We are fortunate that our pool has a really kid-friendly (partly design -- it's fully accessible so has a huge long ramp that is part of the pool, can pick any depth of water you/kid like to be in from 1" to 8' -- and partly management -- great lifeguards who are on their game but also allow kids to be playful) indoor pool. From when DS was about 18 months (which is when it opened), we probably went 2 or 3 times a week and spent 30 minutes to an hour in the pool (basically however long DS wanted to be there). With a kid who's mobile and energetic ... an indoor pool (or an outdoor pool at the right time of year) is a wonderful, wonderful thing.
We didn't do lessons (then), I just stayed with him. Basically, we just enjoyed hanging out in the water and I tried to teach him what I'd been taught, which was mostly about putting my mouth/nose in the water and blowing bubbles (first step to learning how to put head underwater -- blowing bubbles helps kid keep water out of nose). Keeping them safe doesn't require lots of technical skills, watch them, and if their heads go underwater, fish them out (not the whole kid, but the head) immediately, and apply appropriate parenting -- could be soothing, could be bouncing/distracting depending on the kid. By 3, my kid had worked out how to swim (a tiny bit) independently, i.e., keep his head above water for a few instants, basically just from feeling what worked in the water. Over time, those skills got better (i.e. he practiced and learned how to do this).
We later did lessons, a few private ones and then one set of public group which were not good (not a condemnation of the concept, we got an instructor who didn't have the skills to manage/teach a group of ~5-year olds), and subsequently some more private, some of which were shared/group. I'd like to resume those, actually, because while DS is a competent swimmer he's now finally old/coordinated enough (almost 10) that I think he could "get" the strokes -- his earlier lessons he learned the basic moves and can apply them, but not confidently/efficiently (though his ability to get from one place to another and to stay afloat are fine).
Anyway, I don't think there's anything wrong with lessons, assuming kid-instructor-setup are a good match, but I also don't think there's any real need for them at an early age (I do think they're worthwhile once a kid's old enough to learn strokes).
Honestly, I'd recommend just taking your kid to the pool and trying it out. If you're uncomfortable, you can leave. If you're comfortable(-ish), you can stay and hang out and see what works for you. You can also watch how other parents/kids do stuff and that will give you ideas, and you may be able to get a sense of what the lesson options at the pool you're using are (I mean, really see the instructors and get a sense of who's good with what ages and such) and make a more informed decision about what, if any, lessons you want to pursue.