How do I move on?

Hi guys, I have been thinking lately about this guy who hurt me a lot lately. Backstory we were friends for two years and had a situationship but then out of no where he blocked me on everything and started ghosting me in person. Later I find out he has a girlfriend which is okay but I was really hurt he threw away our years friendship. I genuinely cared for him. I tried to talk to him but he refused to talk to me and embarrassed me in front of our friends. He gave me a disgusting look and told me to leave him alone. I was extremely angry and hurt. We have the same friendgroup so everything got so awkward. I eventually left the group. I am still wondering what is the reason he stopped talking to me in specific out of no where. Last time I saw him before that everything was normal and we had a good conversation so it was all sudden for me. It’s been two years since this incident and I still can’t move on. I don’t know if it’s because I need closure an explanation or I can’t process losing a close friend like that. We were together through good and bad times in our life and he was my comfort person and I do have an attachment issue because once I care for someone a friend or a lover I never want to let them go. What do u think I should do?
How do I move on?
Post Opinion