Regarding military force but they did not immediately jump to that conclusion.
On the evening of 12 September 2001, less than 24 hours after the attacks, the Allies invoked the principle of Article 5. Then NATO Secretary General Lord Robertson subsequently informed the Secretary-General of the United Nations of the Alliance's decision.
The North Atlantic Council NATOs principal political decision-making body agreed that if it determined that the attack was directed from abroad against the United States, it would be regarded as an action covered by Article 5. On 2 October, once the Council had been briefed on the results of investigations into the 9/11 attacks, it determined that they were regarded as an action covered by Article 5.
On 4 October, once it had been determined that the attacks came from abroad, NATO agreed on a package of eight measures to support the United States. On the request of the United States, it launched its first ever anti-terror operation Eagle Assist from mid-October 2001 to mid-May 2002. It consisted in seven NATO AWACS radar aircraft that helped patrol the skies over the United States; in total 830 crew members from 13 NATO countries flew over 360 sorties. This was the first time that NATO military assets were deployed in support of an Article 5 operation.
https://www.nato.int/cps/en/natohq/topics_110496.htm
20/20 hindsight always gives us the opportunity to critique what may have been the best course of action. Unfortunately actions taken at the time have to be taken without such knowledge.
For example, while all supported Biden's move to withdraw from Afghanistan, many believed the promises of a new, kinder, gentler Taliban. It was said the Taliban saw the advantages offered by participating in the modern world and would not go back to their old ways. Afghanistan would be a better place for all Afghans with US troops gone. You may have noticed a lack of Taliban supporters lately.