Surging inflation, an economic slowdown, and uncertainty over how long the energy shock will last has forced central banks to adjust.