The war in Gaza had barely begun when 9-year-old Khaled Joudeh suffered an unimaginable loss. His mother, father, older brother and baby sister, along with dozens of other relatives, were all killed in an Israeli airstrike on their home.

In the months that followed, Khaled tried to be brave, his uncle, Mohammad Faris, recalled. He would comfort his younger brother Tamer, who, like Khaled, had survived the Oct. 22 strike that killed their family. But Tamer, 7, was left badly injured with a broken back and a broken leg, and was in constant pain.

“He would always quiet his brother when he cried,” Mr. Faris told The New York Times in a recent phone interview. “He would tell him: ‘Mama and Baba are in heaven. Mama and Baba would be sad if they knew we were crying because of them.’”

At night, when the unrelenting Israeli airstrikes on Gaza would start up again, Khaled would wake up shaking and screaming himself, sometimes running to his uncle to seek comfort.