Stuck in the north, his parents have not seen him since then.
His mother Sondos and father Zakaria scrolled through photographs of Yehia, now five-months-old, on a mobile phone at their home in Jabalia in northern Gaza, severed from the south by Israeli military checkpoints.
Sondos said it was too dangerous to make the 30-km (20-mile) journey from Jabalia to Rafah.
"There are tanks and bulldozers. My husband and I cannot go," she said. "They would kill us. I am afraid my son would end up living alone."
Yehia was born on Nov. 27, seven weeks into the conflict that was triggered when fighters from the Palestinian group Hamas stormed Israel in an attack that killed 1,200 people, according to Israeli tallies.
More than 34,000 people have been killed in the Gaza Strip during Israel's offensive, which has laid waste to much of the territory, according to health authorities in the enclave.
With communications down, three months passed before Yehia's parents were able to make contact with the hospital caring for him in Rafah, and check he was okay. They had stayed behind in Jabalia, fearing they would find nowhere to stay in Rafah.
"After three months, I saw his photo on the mobile phone. I want to hold him. I want to breastfeed him. Every day, my chest hurts. I cannot deal with this," she said.
Yehia is being cared for by the nurses and medical staff of the al-Emirati hospital in Rafah.
Amal Abu Khatla, a nurse at the hospital, said Yehia's condition had been difficult when he first arrived from northern Gaza.
"After one week, thank God, his health improved, but we lost contact with his parents, to the point where we thought that the parents had been martyred (killed)," she said.
She said he had become "the son of the neonatal unit," with everyone taking it upon themselves to take care of him: "He is very doted on, and we pay a lot of attention to him."
In Jabalia, Yehia's father Zakaria yearns to be reunited with him. "My only wish in life is to hold my son and for God to reunite us with our son," he said.