And socialisation happens naturally. You're waiting and lots of other people are doing the same. You are working on problems and can exchange tips or complements or cheer people on. It's inherently social.
The gym is not inherently social unless you are actively spotting / alternating uses of a single machine. You either join that group of gym rats (who in my experience spend 80% of their time talking) or you put your headphones on and crack on solo.