What attracts us to someone is the infatuation, the sex and the great energy. What keeps a relationship going is knowing and loving someone who knows and loves you and being in a relationship where you feel joy.
Don’t confuse being alone with being lonely. You can be alone without being lonely and you can be lonely in a room full of people.
It’s good to learn to be alone and enjoy your own company and it’s good to fill your social life with people who respect you and fill you up instead of draining or ignoring you.