Colleagues can be seen as classmates but to a more professional degree. If you share common interests, there’s no reason not to try and share those interests outside of the workplace. Unless your job sucks then you probably don’t want to befriend people who remind you of it? Or maybe you do so you can talk about how much it sucks, together!
I do agree that it is harder when you’re older and partly that may be because people are already established at an older age. They know what they want and likely have what they need (in terms of friends & family) so they’re not interested in forming new friendships.
I don’t have an issue making new friends, just I don’t easily change from acquaintances to friends because I usually like to make sure they’re not assholes.