I was riding a bus recently and noticed an older man sitting outside a coffee shop on a busy sidewalk. He had set up a chessboard on the table in front of him, and he watched as people passed by, mostly engrossed in their phones. His eyes kept jumping from person to person, searching for someone to notice and join him for a game of chess. Right before the traffic cleared and my bus moved on, he reached over to make the first move, and then resumed his searching.

Loneliness is rampant, and it’s killing us—literally. Anywhere from one quarter to one half of Americans feel lonely a lot of the time, which puts them at risk for developing a range of physical and mental illnesses, including heart disease, cancer, diabetes, and depression. This is a public health problem that needs to be addressed on a wide scale.

But at the individual level, there is much we can do to ward off loneliness. One strategy is to bring a chessboard to a busy street and wait for someone to play with you. For the older man’s sake, I sincerely hope that this is effective, but I can’t be sure.

Another strategy is to volunteer. In a recent survey of over 10,000 people in the UK, two-thirds reported that volunteering helped them feel less isolated. Similarly, a 2018 study of nearly 6,000 people across the US examined widows who, unsurprisingly, felt lonelier than married adults. After starting to volunteer for two or more hours per week, their average level of loneliness subsided to match that of married adults, even after controlling for demographics, baseline health, personality traits, and other social involvement. These benefits may be especially strong the older you are and the more often you volunteer.

Participating in volunteer opportunities may help alleviate loneliness and its related health impact for several reasons. The first and most obvious is that it’s a meaningful way to connect with others and make new friends. I experienced this firsthand when I moved to San Francisco and knew almost no one. After joining a young professionals volunteer group, getting involved with a local nonprofit serving seniors and adults with disabilities, and both organizing and assisting with neighborhood events, I felt my own sense of community and social support increase dramatically.

Second, volunteering can make up for the loss of meaning that commonly occurs with loneliness. Research using the UCLA Loneliness Scale and Meaning in Life Questionnaire has shown that more loneliness is associated with less meaning. This makes sense, given our deeply rooted need for belonging. By volunteering for social causes that are important to us, we can gain a sense of purpose, which in turn may shield us from negative health outcomes. For example, purpose in life has been linked to a reduced likelihood of stroke and greater psychological well-being.

Third, loneliness and isolation can lead to cognitive decline, such as memory loss. But according to the neuroscientist Lisa Genova, people who regularly engage in mentally stimulating activities build up more neural connections and are subsequently more resilient to symptoms of Alzheimer’s. So, volunteering is one way to stay engaged and stimulated, rather than isolated and lonely, and thereby protect against cognitive decline.

These insights may be especially relevant for the growing senior population. By 2030, one in five residents in the US will be of retirement age, may no longer have work to provide purpose and connection, and will be prone to isolation due to increased physical limitations and loved ones passing away. Given that loneliness seems to be most prevalent among those over 65 and under 25 years old, mentoring across ages could be a powerful way to volunteer and connect. Indeed, I recently experimented with hosting an intergenerational friendship gathering and found that it left baby boomers and millennials—not to mention me—feeling gratified.

I wish I could have stopped my bus and skipped my plans that day to play chess with the older man. He struck me as a symbol of our times: people wanting desperately to connect—not through a screen, but face-to-face, with others from their community. Now more than ever, we have a real need and opportunity to build a culture of social health, one interaction at a time. Volunteering is a great way to start.