Ask people where they met their best friends, and many will have the same answer: at work. It makes sense: We traditionally spend much of our lives in the office, so it’s only natural that’s where we have met many of the people closest to us.

Until now.

The rise of remote work has upended all that; the less time we are in the office, the less time we have to form and cement the bonds of friendship.

That’s true for all remote or hybrid workers. But the impact is being felt most strongly for people with the least time working—Gen Z. With few experiences to draw from, young remote workers increasingly don’t even think of the office as a place to make friends.

The impact—on people’s personal and professional lives—could be profound. Removing the social aspect of work further encourages remote workers to keep their jobs at arm’s length. This detachment could have the twin effects of maintaining a better work-life balance, but leave workers lonelier than they would be had they made office friends.

Where we make friends

To see just what a big deal this is, it helps to understand the importance of work in making friends. My colleagues Natalie Pennington and Amanda Holmstrom and I surveyed 4,300 American adults and asked them to identify up to seven friends. Among all the locations that people met these friends, meeting at work (16.1%) was second only to meeting at school (20.3%).

What’s more, over time, work replaces school as a primary source of friendship. In our survey, people who were 51 years or older were twice as likely to have met at least one of their friends at work (44%) than people under 30 (21%).

Having a close friend at work has well-established benefits for both careers and  well-being . Working people are less lonely and socially isolated than those who aren’t working. At the same time, close friendships—wherever they form—boost happiness and life satisfaction . Around the office, workplace friends are advocates, mentors and confidants—a second set of eyes and ears. A friend at work is a source of support.

But to state the obvious, to make friends at work, people have to go to work and stay at work. This is why remote work is a barrier to friendship. As my research has found, friendships require both time and a mutual liking and admiration. A lack of time to socialize at work, particularly face-to-face, decreases the likelihood of making friends or even getting to know one’s co-workers. This means that both less face time and less job tenure decrease the chances that the newest employees will make friends at work.

No interest in socializing

For many young workers, office friendships aren’t even part of the job equation. One 24-year-old remote worker in the tech industry in New York said that she prefers remote work and has no interest in getting a job that’s in the office, although she has never really done it. The idea of socializing with work colleagues seems foreign to her—even though she admits to being lonely.

That isn’t unusual. This young woman is part of a generation of workers who have no conception of work being intertwined with social life. People look forward to going to work when they like the people there, but this isn’t even a factor if a person has never gotten to know co-workers.

In fact, instead of wanting to go to the office, the 24-year-old’s solution is to move back to Boston where she went to college and where she still has some friends.

My cousin, who works remotely in user experience, came up with a similar solution when she moved to downtown Denver to hang out with existing friends. But she told me that the move didn’t help her feel more connected.

“I try to get out and meet up with friends,” she says. “Being downtown helps, but it is hard. I can go days without seeing people.”

All of this could help answer a question older workers often ask: Why would a 24-year-old want to work remotely? After all, many employees’ best memories revolve around socializing during and after work in their early days, and the camaraderie that created. And both of these young professionals are lonely by their own admission.

But neither looks to in-person work for an answer. In some sense, it never occurs to them, because they don’t know what they don’t know.

Another reason there is less socialization in the office is that historically low unemployment rates are encouraging young professionals to consider other options. The idea of staying in a job for many years seems foreign to many of them.

But less social connection and active consideration of alternatives leaves people with the conclusion: Why bother making friends at work? These two factors are probably mutually reinforcing—not making friends at work boosts interest in switching jobs.

Work and life separation

The upshot of changing attitudes about work could be a greater separation of work and home. My closest work friends and I can’t help but talk about work when we are at work. Even when we hang out after hours, work always comes up.

But remote workers, especially those new to the job, aren’t thinking about work all the time because they aren’t hanging out with people from work either during the day or after hours. Their work/life balance entails two separate social worlds—work and life. In that context, it makes sense to move to Boston or downtown Denver to meet up with friends rather than to find a job that requires daily in-office attendance.

One caveat to these trends: Longitudinal research suggests young workers share similar attitudes no matter what generation they belong to. That is, young people are traditionally the loneliest adults, partly because of the series of changes at that time of life.

So, let’s be cautious before conflating the values of any given generation—Z or millennial—with their age.

Still, the social and educational disruptions of the pandemic have left Gen Z lonelier than previous generations. And remote work is something that previous generations didn’t have as an option. If this generation doesn’t begin learning how to make friends at work and seeing the office as a place to be social, they may end up lonelier than they’d otherwise be.

Jeffrey Hall is a professor of communication studies at the University of Kansas in Lawrence, Kan., a visiting scholar at the Berkman Klein Center for Internet & Society at Harvard Law School, and the author of “Relating Through Technology.” He can be reached at reports@wsj.com .