Almost two years ago now, someone who had been a really close friend of mine for over three years at that time ended the friendship, which for me came extremely unexpected. She said that the way she felt treated by me made her sick but wouldn't talk to me or give me more detailed explanations. I didn't feel like I had treated her badly and I was heartbroken. Another really close friend of mine, also my roommate until a few days ago, judged that friends behavior harshly back then, saying that it wasn't fair of her to not even talk to me about what happened. And that exact friend and roommate now did a really similar thing. Our landlord told us we had to leave the apartment, which was really rough in me since I didn't have any other plans worked out. And her behavior to me seemed egoistic, I'd say that objectively, she did make a mistake, landlord got reeeally mad, talked to me on the phone, screamed in my ear, all bullshit. We had a discussion and I said that I thought she owed us, my other roommate and me, an apology, and so on. May be that my tone got harsh, so did hers tho, it was an emotional discussion. But she said she wouldn't apologize for anything, that she had enough, and ended the friendship. I apologized for being emotional and for my tone later, but nothing. She said she didn't wanna talk to me or have anything to do with me anymore. Only with me, not with the other roommate.
I was a total mess for the weeks after and kinda still am. How can It be this happened to me twice? Esp cause the second friend judged the first friend so harshly. I don't understand, I really don't, and I feel insecure as ever. Is it just bad luck, is it me? Wtf did I do wrong

Does anyone have similar experiences? What helped you get through it?