It's not a tactical failure of the US; it's a strategic one. The US operates a tremendously powerful military, but that doesn't change the fact that the war with Iran was a tremendous strategic blunder. "Moronic" is a pretty fair characterization.
It's absolutely a strategic failure to enter into a war without sufficient munitions or logistical capability to sustain the war.
It’s not as if the US, a few years ago, said it needed way more long-range precision weapons in 2026, and didn’t get them, despite promises to the contrary.