Strange... I was thinking this a bit the other day.
I'm 36, own my home, really good job, decent (newish) car, awesome dog, 5 months into a relationship with someone who lives 150mi away, nice coworkers, and ZERO friends here. My best friend is on the other side of the country (3000mi), I relocated 17 months ago and have no actual friends in this new place.
There's nights when I'm a little bored and I think, "other people have friends to do things with, I wish I could be like that". Then after maybe an hour I think, "having friends means spending money. I don't have a lot of spare money. Maybe I should just play with the dog more, or go on a bike ride." By the time I pass-out from the day I've gotten back to "I'm content with my life".
According to a lot of science/psychology/economics podcasts I listen to, what other people have that's "so great" really isn't that great. And even if it is - it's great FOR THEM - which doesn't mean it'd be great for me. On the flipside there's literally hundreds of things I've done in my life that "normal people would kill to do", so in those bored moments I have that to remember.
In the end, it's boredom not loneliness that causes me to have those moments. And boredom is easily killed by a dog, a bike ride, a movie marathon, messaging friends, posting photos from trips years ago to Instagram, reading a book, writing some computer code, or even going to bed early and waking up before the rest of the world does when it's nice and peaceful and dark out.