Help! want my bf back

my ex (of 2 years) and I broke up abt a month ago since he was going to college and some other issues too. (I’m still in hs). I was getting over it but recently got be rly rly been wanting to get back together with him since he’s been my best friend and we’ve been thro everything together and I miss having that with him. But it’s hard since he’s leaving and everything so I don’t know what to do or how to even try to get him back if it’s a good idea. What do I do