I broke up with my girlfriend after I found out she was talking to two girls who I flirted with, did I do the right thing?

Basically my (ex) girlfriend and I have been together for almost 2 years. This all started since last year, when Gia found out I was flirting with two girls who I wanted to be friends with. She even found out I would say I was single. Gia even found out I would still follow half naked girls on instagram when I told he I wouldn’t do it anymore, due to respect for the relationship. She kept on telling me and asking me why I flirted with them and why I would act single when I would respect her. This kept going on, until this year , in June or July, I told her that it was only jokes and that I wanted to be friends with them, but that I didn’t want to anymore because I found out they wanted to be with everyone. I even told Gia that one of the girls was my brothers girlfriend. So, I found out that those two girls even said I kissed one of there friends.
Gia would use my photos to make a fake profile , but she told me that she only did it to find out some things because she couldn’t ask me. I would tell her that she was toxic, imagining things, etc.
A night ago I find out that there was two profiles made, saying mean things about the girls & even how my now ex would talk to them. I told Gia that she made those profiles and told her to stop talking shit about me, when she sent me screen shots of what the girls told her. They told Gia that I lied to her and would talk about a ex who broke my heart. One of them even said that I did Kiss a girl ( they know me since I was little ). So I got mad at Gia and told her that she ruined everything and even told her that she got me in big trouble. I told her I wouldn’t contact her again in my life. I even told her to stop being immature and I even said I would rather be with the girl I kissed instead of a hipócrite like her.

I broke up with my girlfriend after I found out she was talking to two girls who I flirted with, did I do the right thing?
Post Opinion