The Israel-Hamas war could significantly impact economic growth and inflation in the euro zone unless energy prices remain contained, Goldman Sachs says.