You didn't see a connection between people suffering from a lack of meaning and purpose and the decline of an institution that basically specializes in that? Note that no one (here) is saying "church provides the correct meaning/purpose" or even "church provides a good meaning or purpose." Just that churches are out there specifically and directly trying to provide meaning and purpose.
Another angle is that churches often engage in volunteer work. Much more so than your average softball team or book club. If the secret sauce of preventing loneliness is the purpose/meaning/"je n'ais se quoi" of volunteering specifically - churches are/were major players in that space. Even if that connection was coincidental there's a possible link between the decline of church engagement and the rise of loneliness.
Anyway, I'm not the OP. Maybe they thought they were typing in another window and it ended up here, but these are some the connections I was thinking about / reasons I upvoted.