Also, it's hard but not impossible. I'm in that situation right now, where I work in a new location but most of my colleagues have established lifes here. However there are also a small number of colleagues in similar situations, and also there's some movement going on all the time. So yes, my friendships don't grow as quickly as I'd like, but they grow.
One thing to note though is that one needs to pursue it proactively. Don't be ashamed to ask people to add you to their whatsapp group. Don't be afraid to supply other people with food they like, so they will remember you when they want to relax. And take off some time from your hobbies and work schedule so you can participate in meetups.