The Afghans humiliated no side. They absolutely fail to defend their country and hide in Pakistan. Pakistan had blind faith in the Taliban and prevented their extinction when the US struck them in Afghanistan. Brothers, right?
The US and Pakistan worked together to establish the Mujahideen to counter Soviet forces in Afghanistan. The Mujahideen rank and file were largely Arabs, Afghans, and Pakistani volunteers. But the US and Pakistan oversaw the Mujahideen warfighting requirements and guided them in war.
Among the Mujahideen, Osama Bin Laden founded the Al-Qaeda Network. This group became hostile to the US and brainwashed many in the AfPak region. The Taliban of the 1990s aimed to stabilize Afghanistan, but they courted the Al-Qaeda Network and lost foresight in the process. Afghanistan became a terrorism staging ground, and 9/11 set the stage for the American intervention in Afghanistan, which led to the destruction of the Al-Qaeda Network in the AfPak region. But the US noticed that many in Pakistan and Afghanistan support the Taliban. The US had access to Afghanistan from Pakistan so it had limited options in this matter. Therefore, the US decided to negotiate with the Taliban and left. The US left because the Taliban assured Trump administration that they will not allow the Al-Qaeda Network to rebuild in Doha Accords.
Many in Pakistan have the Taliban of the 1990s in mind and celebrated their return. These people are of the view that Pakistan, Iran, and China can work together to transform Afghanistan for the benefit of Pakistan, but this is wishful thinking. The Taliban will not bend to Pakistan and see in Iran an alternate supply line. The Taliban are also fully open to developing a bilateral relationship with any country including India to their benefit. Now, it remains to be seen how strong the Taliban can become, particularly with support from other countries, including India. China is open to business with any country to its benefit. This is how it is.
Pakistan had no Plan B unfortunately. Abdullah Abdullah could be our man. He was in the good books of the US and was also open to working with Pakistan. There could be a force to keep the Taliban in check. But...