Retaliation leads to escalation
Maybe in hindsight it would have been better to isolate the radicalized nations by taking more effort in involving the moderate ones, if necessary offering additional support, and facilitating the migration of refugees from affected areas. A measured, humane approach, taking time to address some of the areas that cause such hatred of the west. Not rolling over and being too conciliatory but using every means available to show the best, rather than the worst of our societies.
I think although we do not agree with how they run their country, live their lives, it is not for us, not was it a viable option back then to impose an alien culture that developed from a Christian heritage with the standards we believe to be acceptable. This especially applies to cultures we perceive as developing. We had to live through our fundamentalist dark ages, our social upheavals, better to ask what help they need, than impose what we think they should have.