Loneliness is an involuntary reaction that arises from a lack of meaningful social connections. Here a meaningful connection is defined as one where there is a mutual sense that you can confide in each other, you understand each other, and you would be there to support each other through difficult situations large and small.
You can have hundreds of social connections but if they don't have these properties, they're of limited utility in combating loneliness. This is why even in a city where it's easy to meet people, loneliness is still a common ailment. This is why celebrities adored by millions can still be so lonely that they end their lives.
It's difficult though not impossible to develop meaningful connections during adulthood. It takes years of contact and requires social or environmental conditions that may not be easy to find. So historically, the #1 source of them has been family (though not everyone is born into a family which supports and encourages them, and the prevalence of such healthy families is decreasing).
The loneliness epidemic in modern times is thus attributable in great part to the erosion of family units and other early age relationships. What makes it difficult to solve is that there were a number of grievances with that model which the liberal, individualist project intended to address, such as the oppression of women who were economically dependent on their husbands, and the way in which tightly knit families often stifled self-expression. The modern system in which all adults are workers and consumers also supports the interests of capital (more workers equals cheaper labor, more consumers means bigger markets, together you get record growth). No one really wants to roll back the progress that the liberal project achieved, but the side effects are ravaging society.
The colloquial solution is Friendsgiving dinner--let's still do all the things people used to do with their families, but do it with our friends. However it misses the point that meaningful relationships must be developed over years of regular contact, mutual trust, and even sacrifice--not impossible, certainly worth attempting, but hard to do reliably in adulthood with people who may develop divergent interests over time (for example, starting their own families). Therefore it is unlikely to be a systemic solution. I have no systemic solution to propose.