Imo talking to strangers at the gym is hard. I made friends there just by saying 'Hi', waving to them when we started to see each other working out often enough. Then once you're using the same equipment or get dressed in the locker room you have a conversation about whatever and there you go.
Anyway, the fastest way I made friends outside of school was at a language course, where you have to speak a lot about something. You can switch partners during the course, so you can talk to other people. Another thing is sports clubs, it works out the same as the gym.
So the answer is, I guess, just going to gatherings where people learn new things with an instructor.
100% this. As you say, language courses need content so a lot of it is talking about your life/opinions. Super easy to make friends after a few weeks of that if you make a tiny bit of effort