I work in a gym, I'm a personal trainer. Yes, we have a lot fewer classes now than we did (say) three years ago.
I think it's a combination of things. In my opinion the following have all had an impact:
Some of the franchise models/licenses have become more expensive, and gyms are being hit by rising costs just like everyone else and looking to save money. LM in particular can be a bit awkward because they make the gyms buy packages of several classes, some of which they might not want or need. It's not terribly cost-effective, especially if we're struggling to fill the classes.
We lost some staff in 2020 and 2021, including class instructors. Some were EU citizens and left to move to an EU country because they either felt unwelcome or couldn't make UK citizenship work for them. Wages for class instructors (tends to be lower than PT pay) have frozen too and this (plus the cost of living rises) has pushed some people out of the industry.
Some people bought Pelotons or WattBikes for home use and do their workouts at home instead of going to a class.
Over the pandemic, my gym in particular prioritised paying the personal trainers (like me!) and other staff over paying class licenses/packages. We deliberately let some of the licenses slide in order to pay staff wages and keep staff around for when things opened back up again.
There seems to have been a bit of a shift in fashion, where gym-goers will pay their memberships and sometimes for personal training or functional training — and my gym has dropped PT prices, but changed how the packages are sold — but aren't quite as interested in classes. People seem to want one-to-one.
Certainly at my gym, the typical client for classes has tended to be the people who are/were more at-risk from covid, or at least see themselves as being at more risk. There's definitely an ongoing unwillingness from some to get back into rooms with other people, especially in an exercise context. (Spin is an exception to this, but the typical spin client skews younger anyway.)