I did my masters far away from home/where I did my undergrad and it took a while for me to get comfortable. My first cohort was far more focused on figuring out grad school than becoming friends (we also didn't perform or create anything as a group until the last teaching block). However, these were mostly external reasons and you haven't really mentioned similar circumstances. Getting into researching your specific interests can make socializing more difficult as you have to pull yourself out of the tunnel-vision of detailed research in order to communicate with others either not interested in the particulars or those who just really don't get why you're doing more school. For me, what helps, is finding/remembering other things about me that are super cool and that others will be interested in. It's difficult at times, but also reminding yourself that this is you growing and learning.
My favorite moment from my second masters was in a voice class when my tutor said a class of undergrads had been complaining and frustrated with understanding subject material (probably not knowing what the lecturer wanted). The professors response was to explain that the feelings of frustration were "the feeling of learning".
Good luck and feel better!