After nearly 20 years working in economic policy, Heather McGhee realized she needed a different approach to understand the fault lines of American division.

“By 2017, I realized that there was something else going on that was making policymakers ignore the mounting evidence of Gilded Age era inequality and that there was some story that was operating in many Americans minds that wasn’t amenable to change by dollars and cents and economic data . . . I needed different tools than an economist’s tools to figure it out, and that’s why I set off on my journey across the country,” she said.

Ms. McGhee’s voyage took her from coast to coast, interviewing hundreds of Americans to try to answer a simple question: “Why can’t we have nice things?”

She pondered why other wealthy and industrialized nations provide robust public goods like universal child care and health care, paid family leave and livable working wages while the United States does not.

“It was that journey that led me to write The Sum of Us,” she said.

Ms. McGhee identified a “zero-sum” mindset as the pervasive myth preventing shared progress, writing that “the narrative that white people should see the well-being of people of color as a threat to their own is one of the most powerful subterranean stories in America.”

The Sum of Us pushes back against this thinking, illustrating examples of Americans of diverse backgrounds who improved their communities by working with, not against, each other. Prior to hitting the road, Ms. McGhee was president of Demos, an inequality-focused think tank. The transition from economic policy advocate to writer was not immediate, she said.

“I didn’t feel like a writer, I didn’t feel like I had switched to being an author until the book was out,” she said.

However, writing allowed her to reconnect with an earlier passion.

“My mother, who has seen me writing since I was a very little girl . . . when she finally read the finished manuscript, she said, ‘I’m so glad that all those years as a lawyer and working in economics didn’t educate the writer out of you,’” Ms. McGhee said, recalling the moment with a laugh.

She said finding the right vignettes was “a lot of trial and error.”

“I talked to hundreds of people. Probably dozens ended up in the book,” she said.

While she worked on the book, she gave birth to her first child. She said motherhood changed her relationship with work.

“I think having a baby made me smarter and made me more efficient because anytime I spent working was time away from my son, and I do think I’m better at my job as a mother than I was before,” she said.

The 2016 and 2020 presidential elections bookended her writing and research process. These divergent outcomes changed her feelings about the future.

“I definitely ended the journey much more hopeful than I was when I began, even though the politics of zero-sum are probably more on display than they were in 2017,” she said.

“It became very clear that white racial resentment and zero-sum logic had become the core narrative on the right,” she continued. “It also became clear that more and more white Americans are willing to stand up for what’s right and not be lied to anymore about our history and about each other, and that was very encouraging.”

Throughout the narrative, Ms. McGhee recasts the language of the American creed to forward her vision of a progressive and multicultural country.

“I’m a very patriotic American… I love this country, and I have my eyes wide open to its faults and its tragedies,” she said.

She does not want the painful history of the country to discourage envisioning a better tomorrow.

“We have to have a radical imagination . . . gains will only be achieved when we come together across lines of race to find common solutions to our common problems,” she said.

Ms. McGhee will continue to explore the themes of The Sum of Us in a 2022 podcast series produced by Barack and Michelle Obama’s production company, Higher Ground Productions. According to her, she will “hit the road again,” telling stories of solidarity from across the country, revisiting some communities she already wrote about and also finding some new examples.

As for the book festival, Ms. McGhee looks forward to returning to familiar terrain. She spent the summer after high school engaging in a classic Vineyard ritual: scooping ice cream at Mad Martha’s on Circuit avenue.

Heather McGhee takes part in a panel discussion Friday at the Martha’s Vineyard Museum beginning at 12:30 p.m. The discussion is titled History: Racism and Exclusion and includes Vernon Burton, Heather McGhee, Patricia Sullivan, with moderator Barbara Phillips. She also participates in an author discussion on Sunday at the Chilmark Community Center with Bliss Broyard, beginning at 10:15 a.m.