First, you must love yourself. Then, love others - family, friends, or strangers. Expect nothing in return. If you can get over those two hurdles, it will be a lot easier to be loved.
Imagine if you hated tofu. But you wanted to convince others to love tofu. Maybe you’re a door to door tofu salesman. Only a gifted con artists can make that sale. In this example you are tofu.
In every relationship, from professional to familial to romantic, you must constantly give more than you get. Most of what you give will be taken for granted. But you’ll notice who appreciates you, and they will get more of your time and effort.
Anyway it’s not that great being loved. It’s a burden in some ways, because of how carefully that burden must be carried. You must act in service to those who love you. Love can be suffocating, and blinding. Many people forgo their own health in service to those who love them. It’s a difficult balance. But for evolutionary reasons, it feels like it’s “enough” in life to be loved. And that peace is hard to find through other means.
There’s a freedom that comes with loneliness. You can travel and explore. You can take much bigger risks. You can make foolish and selfish decisions.