Karim al-Masri was supposed to start his final exams on Saturday morning, just a few weeks shy of graduating. Instead, he spent his morning filling bags of water to freeze into ice, which he sold to support his family.

“I should have been studying and preparing for my final exams,” said Mr. al-Masri, 18. But, more than eight months into the war, “I’m spending my days working to provide for my family to cope with the situation.”

Mr. al-Masri was one of nearly 39,000 students in Gaza who were unable to take their high school final examinations scheduled to begin on Saturday across the Palestinian territories and in Jordan, and who would not be able to graduate, according to the Palestinian Education Ministry.

The war has devastated Gaza’s education system which was already struggling after several wars and escalations since 2008. At least 625,000 children are missing out on education in Gaza, according to UNRWA, the U.N. agency that assists Palestinians, with schools shut since the war began in October, just over a month into the school year.

More than 76 percent of schools in Gaza would require rebuilding or major rehabilitation to become functional after Israel’s monthslong offensive, according to UNRWA, which operates many schools in the Gaza Strip. The majority of these schools have been used as shelters to house the many displaced families in Gaza, most of whom are living in miserable conditions.

Mr. al-Masri said that he dreamed of studying information technology at the Islamic University of Gaza or the University College of Applied Sciences — both of which have been destroyed by Israeli bombardment. All of Gaza’s 12 universities have been severely damaged or destroyed by fighting, according to the United Nations.