Confident but avoid connection, why?

If anyone can possibly explain a psychological solution to my yet confident behavior when it comes to socializing and talking to others but once they reciprocate connection I get avoidant and block up my emotions and block off any express that hinders connection.

And people give off a vibe as if I’m not interested or expect more of me, because I fail to give that “confidence guy” connection when in reality, I avoid, and also when people speak to me I hear the words but my brain doesn’t creating relation to what is being said unless I fully experienced what they’ve been through, or hobby, etc.

So psychologically how can I fix this avoidant thing? I’m looking forward to getting into dating and a girlfriend soon and on the short end of dating I’m a straight A-hole but on the other hand I really want some love. Finances & Life is looking right just need to know what steps to take in terms of therapy, healing, etc, or whatever the case is… thank you!