The commonality between all four of these incidents is that they correspond to severe supply shocks:
- During WWI and WWII, industrial supply was rerouted by force to the war effort, leaving normal consumer demand unfulfilled.
- During the oil crisis of the 70s, a critical energy input to the American economy massively increased in price due to sanctions placed on America.
- During the COVID-19 pandemic, a significant chunk of workers were paid not to work, as a form of deliberate supply destruction to avoid the spread of a novel coronavirus.
In a "normal" economy, supply is flexible enough that you can print money and nobody even notices. The supply curve is smooth and gradual, so prices only rise a little. When supply is constrained, however, prices rise to whatever value is necessary to curtail demand, because they have to. The supply curve is a brick wall.
It's the issue Russia is facing right now in Ukraine. Even if Putin wanted to stop, his economy has turned entirely wartime, when it ends the country crashes on itself.
A lot of money is printed.
Also, war is not an activity that generates wealth (but to some it does, obviously).