There was an entire recent-history drama movie released about how our repeated fuckup with the Middle East was that we went in, toppled a dangerous regime, then fucked off without actually sticking around long enough to improve things so that a new dangerous regime wouldn't come back specifically because it wasn't providing politicians any boosts in their polls to do so. Didn't it win some fucking Oscars or something? If some Tom Hanks vehicle can grasp that the essential fuckup is that you should either go all the way or leave it alone, why can't they?
That... is exactly what we have been doing. The fact that we usually stick around just long enough for a token visible public election and leave some token forces there to "train" the "soldiers" that will soon be working for the next anti-American terrorist leader to take over the country does not count as actually sticking around. "Fuck shit up and leave" has been the policy for decades and is exactly why the situation never improves, because then we just leave fucked-up shit and a lot of bitter and extremely poor people who are ripe for being rallied behind any shouting tyrant with a bit of charisma to throw around. That is literally how Nazi Germany happened.
Our actual mistake after we invade these countries is that we give them back. We expended the blood and resources to take them, we oughtta just fucking keep them. When people start raging about America's imperialism just say "Yup, we're the United States of America and Its Imperial Territories now, do something about it."