I felt just like this after 9/11. I don’t know enough about your country to tell you what the right thing to do is. But I wish that the USA could go back in time and just gradually assassinate Al Queda with the CIA instead or something. Those occupations were doomed from the start.
The US government at the time did not want to do any such thing. Project For A New American Century, the think tank most of the Bush administration officials came from, openly wrote about how they were hoping for a “new Pearl Harbor” they could use to take the US into war with Iraq. Later, President Bush got a memo about how Al Qaeda was going to attack the US mainland and he did nothing. Then 9/11 happened and the government lied the country into a war with Iraq. What part of this makes you think they were going to do anything about Al Qaeda (other than giving them more funds maybe)?
The CIA is literally the reason the Al Queda exists. has consistently been the biggest force funding and training terrorists groups around the world. Al Queda is just the modern iteration on the Mujahideen whom US was propping up in the 80s.