How to get over him

So their was this guy I met and he was really nice and he was extremely attractive, we became really good friends he stayed by my side through a lot of shit. I told him I liked him and he said he liked me to but didn’t want a relationship, I agreed because at that point in my life I didn’t want to commit to anything but we continued being friends with benefits type shit for 1 year keep in mind my longest relationship with a guy was probably a month so this was different for me. But I decided to tell him that I wanted more, I wanted a relationship, I had gotten too attached and after I told him how I felt he ghosts me for a week but then we started talking again but it wasn’t like before. I feel so stupid for missing him but I do, how to I get over him.