Definitely know the feeling especially if you are in place you didn't grow up.
Not a magic formula but I find sports opens a few doors for starting to make new friends.
Once mentioned on HN before: if you are ever invited to something, just go. Disclaimer as long as it aligns with your moral principals.