You're conveniently ignoring the fact that the US has historically ruined entire countries for multiple generations just to benefit itself. Maybe if we'd stop carpet bombing other countries we'd have fewer people that hate us.
Most of the problems in the Middle East, at least with regards to them hating the US, are because the US did something to directly make them hate the US. Iran, Iraq, and Afghanistan - at least in their current iterations - are all problems the US created. This is barely even beginning to describe the list of atrocities the US has committed against other countries.
The US has terrorists because the US creates terrorists, sometimes from us terrorizing other countries that are too insignificant for the world to take notice.
If you think I'm being hyperbolic, look into the history of US drone strikes just for a very recent example of the US leveraging its military superiority to decimate other countries. What's interesting is it gets worse regardless of the president.