So just wondering what is wrong with me?

Why every time I get close to a guy- I freeze up and get scared and run away?

I was talking to a friend tonight well a guy I used to date but we’re still great friends with occasional benefits and he mentioned I’m too flip floppy- one minute I’m talking about having a revelation I’m getting too old and I wanna settle down with someone- then the next minute I am loving the single life and living it up with him or him and I forget about the guy that I’m into. Windeing if I’m so guarded that it’s a defense mechanism to shield e before the hurt happens, the cheating happens, or the control and abuse happens. I wish I didn’t live my life like this and can be normal and have a committed relationship with a guy but not sure I know how to love. Damn as I say it out loud it’s sounds really fucked up- am I the only female in the world who feels like this- should I just be single and love it up with whomever I want or maybe I just haven’t found my match yet who I could like or love enough to not want to run away from.

This dating world is confusing as hell- wondering if I’ll ever get to the point where I’d let myself be vulnerable to a guy- maybe someone would stick by it all and see my faults and still love me.