It's fair to say overall engagements were bad, but it's hard to argue that a military looses when it streamrolls the opponent, and then 'decides to leave'.

The US generally wins wars, but can fail on occupational and grander objectives, which are different things.

The US 'tied' in Korea, eventually 'won' in Vietnam but then quickly decided to leave - strategic failure), 'won' in Iraq but a grinding occupation left it a strategic quagmire but no total failure.

Middling intervention in Syria was effective in bringing down Assad and now there is a transition to 'something somewhat better'.

There was no fight to even win in Afghanistan as the Talibain was overthrown without direct intervention - the follow up was entirely occupational - and though it was a strategic failure, it wasn't a military defeat. The West just did not want to continue paying the cost of keeping the fighters at bay. That's a 'stupid set of decisions' which is different than 'losing'.

This is all different from Russian failure in Ukraine where it cannot meet it's military objectives.

Iran is shaping up to be a 'military tie' - because US is engaging from afar it' abilities are limited and is taking real losses ... and a pretty big strategic failure, having lost control over the Gulf, no 5th fleet presence in the Gulf, allies attacked, Iran emboldened. Bad.