That's just not a true reflection of public opinion about the Afghanistan and Iraq wars. Support for the war in Afghanistan steadily fell from nearly 90% in 2002 to well under 50% during Obama's second term. Similarly, support for the Iraq war plummeted under Bush and remained effectively flat under Obama.
https://news.gallup.com/poll/183575/fewer-view-iraq-afghanis...