In your position, classes can be a good way of starting out, because you can pick up technique and have fun doing it.
If you pick the right sort of class, you'll be in good company.
For example, I wouldn't pick a 6am "Bootcamp" class! At my gym, the 9:30am classes have a mixed bunch of ages & fitness levels. The 6pm Pump class is generally full of fitter people, but always has some beginners in it. The 6pm Spin class is full of super-fit people.
Start gently. If it helps, stay at the back & follow others. But it's always good to introduce yourself to the instructor and they'll keep an eye on you, if they're any good. In that case, if you go to the front (maybe to one side) then you can get some coaching & correction.
But remember, most people are in the gym, and in classes, for themselves. They don't really notice other people. Or if they do, it's maybe because those other people are doing something special! I'm always gawking - in admiration!!! - at the amazing things I see other gym members doing.