At 90, Beverly Herzog is writing songs for the first time.

Once a week, a music therapist helps Mrs. Herzog transform her thoughts into lyrics, then sings them back to her mellifluously over the strums of her guitar. The result can be transformative. When Mrs. Herzog listened during a session in December, she marveled at how magically the music reflected her views on love and life.

“I can’t believe it,” Mrs. Herzog said in her room at the Hebrew Home at Riverdale in the Bronx. “So I sit with my mouth open, I do. And I’m starting to get an appreciation, not just swallowing it,” she added. “Not because it’s a song that we wrote together, but because it feels, like, complete, for all of us.”

Suffering from memory loss, Mrs. Herzog can sometimes be confused. In her session, she told her music therapist, Kaitlyn Kelly, that her husband, Bernie, was coming to visit, but he is not alive. She talked about her job taking her away from her family, though she has lived at the home since 2013.

But about her songs, she is not confused. She offered detailed edits.

“Where it says ‘I’m getting old,’ it should say, ‘I’m getting older,’ ” Mrs. Herzog told Ms. Kelly about a line in a song titled simply, “The Song.” “Because I am getting older now. And it is hard work.”