Many posts have discussed war powers and the US military.
Natalie Jackson at National Journal:
Afghanistan was retaliation for 9/11, and was therefore extremely popular. Americans’ desire to avenge the attacks translated to more than 90 percent support for military action. More than 6 in 10 supported a long-term war. Eighteen months later when we went into Iraq, sentiment was still fairly unified and supportive of going after foreign enemies—two-thirds of voters supported military intervention to take out Saddam Hussein, including a majority of Democrats.
It also helped that the international order supported both wars in the beginning. The world was fairly easily convinced—incorrectly, as it turned out—that Iraq was making nuclear weapons. That fear was accompanied by humanitarian concerns and Iraq's alleged terrorist ties.
Both wars ultimately became unpopular and untenable. The eventual wind-down in Afghanistan was chaotic and unpopular, and in mid-2021 more than 6 in 10 Americans said it hadn’t even been worth fighting. In 2019, 62 percent of Americans and 59 percent of Iraq and Afghanistan veterans said the Iraq war had not been worth fighting. There were two big wins: taking Saddam Hussein out of power and killing Osama bin Laden. But for most, there was little point in continuing the wars after those wins.
Americans have become increasingly isolationist in the last 15 years. Donald Trump campaigned on that isolationism, only to turn toward military action and regime change once he returned to office. That the administration is working closely with Israel also colors the reaction to attacking Iran. The American public has grown substantially less favorable toward Israel over the last few years.
We’ve been involved in periodic conflicts with Iran since the late Ayatollah Khomeini took over in 1979, particularly in trying to keep the ultra-religious regime that chants “death to America” from getting nuclear weapons. But without a huge provocation from Iran, a preemptive strike was always going to be unpopular. Combine that with the recent history of U.S. wars in the region, and you see that public reactions go far deeper than partisanship.

