I think it's decent advice, but from my experience, it can take years to make friends that way. I practiced various sports my whole life in the context of sport clubs (martial arts, climbing, snowboarding, swimming...). The way it worked for me is that after months, sometimes years of chitchatting with same people over and over, I barely made any good friends from that context. I did make a bunch of "acquaintances". Definitely better than staying home, but not a silver bullet.