Why does things like this need to happen? and was it handled properly?

So I was in grade 7and I met this boy. We talked a lot and always hanged out. Long story short we ended up liking each other and he asked out like two weeks b4 school ended. The beginning of grade 8 we were in the same class and we super happy about it. To be honest this was both of our first time dating and you can kinda call it our "first true love". We been dating for more than 5 months and we tell each other everything and we are super close. I meet this other guy and I start to develop feelings for this other guy but he is nothing compared to my boyfriend. My boyfriend finds out and gets mad, I told him that who cares if I like him! At the end of the day out of all the guys I am with you. A few months past by and him and my best friend gets really flirty. I talked to both of them about it because it really bothered me. There was gonna be this dance and I was going on vacation. When I was on vacation to friends were telling me that my boyfriend and best friend are doing things behind my back. I ignore it and got my boyfriend to go to the dance ( he wasn't going because he said I wasn't going to be there ) and my other friends kept telling me there were doing things behind my back again. So this time I talked to him about and got into this huge fight and I realized it better if I apologize bc I don't wanna lose him, I apologize and he was like no I don't accept ur apologize and we kepted going back and forth. One of my friends told me I needed to break up with him because the way he been treating me So I did and his response was "you beat me to it". Like 2 months later him and my best friends on the exact day he asked me out. It still hurts, ( he was my first everything) I don't know what to do or if I handle it well and the three of us are going to the same high school.
Why does things like this need to happen? and was it handled properly?
Add Opinion