Friend Struggles

I am dealing with the 4th bff break in less than 2 years. Any advice on how to stay strong? I know that middle school years are the sorting years but it's still hard. I'm just struggling with trying to open up to anybody and it seems like every time I do I get hurt.