Well to start off the cold war timeline. The Greek civil war was an American victory, then China fell to the Communists and we spent decades arguing who lost China. Then the Soviets let off Joe 1 and it turns out the Manhattan project was heavily infiltrated by Soviet Spies which made the American nuclear monopoly a short foot note. The combination of those 2 factors resulted in the Korean War. Which was looking like all of Korea would be lost, then all of Korea could be gained until China entered, resulting in a tie. The lessons learned from Korea made the next war in the region the Vietnam War politically constrained, which succeeded in preventing China from entering the war directly like they did in Korea, but resulted in the entire country of Vietnam being lost to the Communists which was a worse outcome than the tie that was Korea.
The Gulf Wars learned the lessons of Vietnam, and the constrained vision of keeping Saddam out of Kuwait meant there was no quagmire. Kosovo was also a success, as there was regime change for the better in the former Yugoslavia.
The 2000s after 9/11 were some "fucked up wars", the US military seemed to have learned the lessons from the 90s that they should have gone farther with regime change, and forgot the lessons of the Vietnam War. Taking down Saddam didn't result in a more stable Iraq, Iraq didn't turn into a flourishing democracy. After the US withdrew from the country under Obama you have the emergence of ISIS. Obama also helped decapitate Gaddafi's regime, which made Libya less stable. The actual war parts may be successful but if they're not achieving political or strategic goals those wins do not matter.
There's an apocryphal tale of an American and a North Vietnamese general after the war:
American: “You never beat us once.”
North Vietnamese: “True, but irrelevant.”