Rabbi Myers and others described feeling encouraged by the image of President Biden embracing Prime Minister Benjamin Netanyahu on a visit to Israel last week.

“It was so reassuring at a time when you wonder, Where are your friends?” he said.

The attacks have inspired a wave of menace on social media, street harassment and scattered violence across the United States that has many on both sides of the conflict feeling wary.

The Anti-Defamation League reported Wednesday that there was a significant rise in antisemitic incidents in the country in the weeks after the attacks by Hamas. The Jewish advocacy group recorded more than 300 such incidents, including threats and assaults, between Oct. 7 and Oct. 23, compared with 64 incidents during the same period last year.

Palestinians and their supporters, too, have cited a rise in aggression. A 6-year-old Muslim boy in Illinois was fatally stabbed by his landlord, who was angry about the war and wanted his Palestinian American tenants to move out. On college campuses, students who blamed the attack on Israel have been doxxed and had job offers revoked.

“The spiritual danger of these dark times is we fall into utter despair,” said Rabbi Amy Bardack, who has been in her position since last year at Congregation Dor Hadash, which shared the space at Tree of Life in 2018. “Living joyfully is actually a discipline, a practice that prevents us from falling into that pit of despair.”

Hours after she said that, things grew even darker, as more gun violence raged in the nation, this time in Maine.

In her previous job at the Jewish Federation of Greater Pittsburgh, Rabbi Bardack organized an event commemorating the first anniversary of the attack. This year, plans include volunteer opportunities, Torah study and a ceremony on Friday afternoon in Pittsburgh’s Schenley Park.

Mark Fichman attended an anniversary service on Thursday night that was a combination memorial and anti-gun violence event. He was at home when the attack took place in 2018. He belongs to another synagogue nearby, but Squirrel Hill is a tight-knit neighborhood, and he knew several of the victims.

The violence that day was disturbing to him, but it was also galvanizing, Mr. Fichman recalled. Days after the shooting, he marched with thousands of people in protest of President Trump’s visit to Pittsburgh, a rally organized in part by the progressive Jewish group IfNotNow.

“Everyone understood what happened to us,” Mr. Fichman said. The war in Israel and Gaza, by contrast, is “an abstraction” to people without personal ties in the region.

But Mr. Fichman’s reflections on the anniversary are separate in his mind from his worries about Israel, where he has cousins and many other connections. The antisemitism he fears most in the United States comes from the far right, which inspired the Tree of Life attacker. The violence from Hamas has a different ideological source.

Beth Kissileff’s husband, Rabbi Jonathan Perlman, was in the building during the shooting. Their family’s response to that trauma has often taken the shape of activism: Two of their daughters founded chapters of the anti-gun violence group Students Demand Action, and Ms. Kissileff publicly opposed the effort to seek the death penalty in the case against the assailant.

Ms. Kissileff recalled the prejudice her father’s generation encountered on elite college campuses, the kind that nudged Jewish people out of certain jobs and did not invite them to certain groups. When she was at Columbia University in the 1980s, she heard that a few professors did not like Jewish students, so she avoided their classes even though she was interested in the subject matter.

“My family has had to deal with it, but there were workarounds,” she said. “The polite antisemitism, that’s not what we’re dealing with now.”

But years after the shooting at Tree of Life shattered any real sense of complacency, she is again experiencing a sense of fear and alienation.

“I thought that with the five-year mark, there’d be a certain healing,” Ms. Kissileff said. Instead, “it’s opened up all the old wounds.”