The majority in the US opposed entering the war until Pearl Harbor, even though the administration of the time strongly wanted to.
Afghanistan wasn't the only country in the region (nor weas that the only region in the world) in which the US conducted campaigns against al-Qaeda and factions allied with them.
> Bin Laden hid in Pakistan after all, and the Taliban often crossed the border to Pakistan to seek refuge.
And the US conducted attacks against al-Qaeda and the Taliban in Pakistan from very early in the war, and also against bin Laden himself there.