Heartbroken again please help!

I was in a longer term relationship with a military guy and we broke up two months ago, however I guess I was sad and didn’t know how to handle it. So me and this other guy (that I knew before) started to hang out which lead us to have a “fling” I guess because he’s leaving far away for college so we never agreed this was going to be serious but we agreed that we would hookup and stuff. I went camping with him and some friends this weekend and him and I hardly talked he was being distant and his energy changed. On our way home, him and I talked and he confessed that he still had feelings for his ex and that our little thing wasn’t going to work anymore. I respect that ofc, so I told him okay...but I feel bad because I think I might’ve caught feelings for him but this is the part that confuses me, did I actually like him or did I like the idea of him because I might not be over my ex? In some way I do feel like I moved on a little because I no longer stalk him on social media and don’t feel as sad as before. Maybe this new guy was just a distraction from my numb feeling.

I just need help because why can’t I just be okay with being alone? Why do I get attached so fast? Why do I feel like I need someone to be with me in order to feel happiness? any advice or anything would be very helpful. Thank you!