Here's an important corollary:
Don't shit where you eat.
https://en.wiktionary.org/wiki/don%27t_shit_where_you_eat
That is, avoid getting into romantic relationships with people at work. And for God's sake don't think of work as a cruising ground for members of the appropriate sex(es).
Sure, there's a chance both of you might simultaneously be two of the lucky ones for whom everything always goes perfectly, without any hitches or conflicts. But back in the real world, relationships have problems, and jobs have problems, and when one of those problems inevitably occurs in one domain, it sucks if it dominos over into the other domain.
In the ideal world, we'd all be eternally happy with our personal relationships, and eternally happy with our jobs. But if you suddenly become unhappy with one for some reason, it really sucks if you also lose the other because of it.
And also remember what Freewheelin' Franklin of the Fabulous Furry Freak Brothers said:
"Dope will get you through times of no money better than money will get you through times of no dope."
https://pbs.twimg.com/media/ETBgAc0WoAEEZMF.jpg
https://en.wikipedia.org/wiki/The_Fabulous_Furry_Freak_Broth...
I honestly think there's a huge amount of survivor bias in this mindset. I'm in my thirties and I know more married couples who met at work than those who didn't meet at work. And the ones who didn't meet at work met at school. Even had two senior managers at my first job break up their marriages (both with kids) to get together. As far as I know they got married and are still happily together.
I think you just hear a lot more of the wild stories of the ones that go wrong.
Of course, it’s probably not terrible advice to tell everyone in a breakup to treat their soon-to-be ex as if they will one day be your manager. It’s just not likely that everyone will be able to follow through.
I have a wild tinfoil hat conspiracy theory that all corporate social events and activities are designed to foster this kind of 'support network' to discourage employees from leaving. I wondered why so many people stayed away from those when I started my first job.
So I'd say it depends; just go into it knowing making the friends isn't the same as when you're in school.
If I would make a friend among co-workers, surely it would not end if any of us switch jobs? As in ex-student friends. Put in another way if you lose your friends from changing jobs they were not your friends.
I have made some extremely good friends through work, including the individual who, outside my family, is the person who I still see that I have known the longest in my life (we started our new jobs at the same company on the same day, approx 35 years ago).
The mistake is when your colleagues become your only friends. Changing jobs can see you lose your entire 'support network'. Always take the time to maintain friends outside your current work.