As conflicts rage in Ukraine and the Middle East, the picture offered to the world by the United Nations in New York is often one of division and paralysis. But far from U.N. headquarters things look different, its agencies mounting relief efforts in the most challenging of circumstances.

On a recent day in the Gaza Strip, U.N. officials were offering shelter in a vocational center to over 30,000 people sleeping on bare floors amid puddles of mud and overflowing sewage. “People lost everything, and they need everything,” said Juliette Touma, director of communications for UNRWA, the U.N. body that cares for Palestinians, who had traveled to Gaza for two days with the agency’s commissioner general, Philippe Lazzarini.

The officials were also trying to buck up their own staff. One U.N. staff member told them that he finds a place to hide and cry every day in order to cope, Ms. Touma said. So far, 130 staff members for UNRWA have been killed in the war and many are missing, feared dead under the rubble.

The United Nations was created in the aftermath of World War II with the intention of “saving succeeding generations from the scourge of war” by maintaining international peace and stability. While it has failed to achieve that ambitious goal, it has evolved into a vast global humanitarian aid agency that many call more vital than ever.

In Ukraine, where an estimated 17 million people need help, the U.N. refugee agency has provided cash assistance, housing and shelter. After the devastating earthquake in Turkey and Syria, U.N. convoys carrying food, water, tents and medicine were the main lifeline for Syrians living in opposition-held territories. In Afghanistan, UNICEF provides 15 million children with food and medical care.