From what I little I've read about it, some of it is being the supportive and caring person to yourself that you may not have had before. Especially if your parents weren't supportive, caring, or helpful, you try to re-parent yourself when situations come up by being that supportive, caring, and at times helpful person to yourself, talking to or doing for yourself the way a loving parent or person would.
In the movie Eighth Grade (or what I took away from it), the girl is pretty much alone. Her mom's not there; her dad's clueless about parenting. Most of her classmates aren't very nice to her and aren't very nice people. She makes short self-help youtube videos to help others navigate eighth grade and does the best she can raising herself and getting herself through eighth grade. At least her dad recognizes this. He admits he doesn't know how to raise a child, and tells her something like, "You're doing an amazing job raising yourself." Made me cry because I've had to do so much on my own and for my parents, all while being treated like crap. By family, friends, and relationships. I wish someone had recognized how hard life was for me. As well as some good in me, even though now, I don't have any friends and my family still treats me like my feelings, thoughts, or reactions don't matter. Unfortunately, I tell myself that I don't matter, so a part of self love seems like it's just treating yourself in a good way now, especially when no one else, including yourself, has or does.
In terms of loving yourself before others can love you, I interpret that as it'll help you recognize the right way to treat yourself, so that you'll recognize how you want to be treated. And then you can recognize and weed out people who don't treat you properly or who manipulate you into thinking what is bad treatment is normal, deserved, or there isn't any better. And also recognize, understand, and eventually trust those who do treat you properly.
Even if I'm alone and kill myself, I want to know that when I did little wrong for the most part, I didn't deserve to be treated that awfully. So even if others continue treat me that way, I might not treat myself that way every time.