You are in hubris.
Are you new here?
Yes, Hezbollah defeated Israel in a war on the ground in 2006. Israel was also under substantial international pressure to "give up."
It is rather important to understand that Israel have learned much from war with Hezbollah and developed impressive technologies including Trophy APS to intercept ATGMs and Iron Dome to intercept rockets. Not long ago, Hamas unleashed greater number of rockets on Israel than Hezbollah ever did and Iron Dome blunted much of the attack and prevented much damage to Israeli infrastructure by extension. Israel also have demonstrated the ability to strike anywhere in Syria even though Syrian A2/AD systems are rebuild and extensive with a mix of Russian and Chinese technologies. Point is that Israel is learning and getting better in the end.
WE live in times in which people have access to considerable levels of information. I have a fairly good idea of what happened in Afghanistan.
Yes, thousands of US/NATO troops have died in Afghanistan (casualties are well-documented) because Afghan Taliban and the sort adopted asymmetric methods to fight them. They observed movement(s) of convoys, planted IEDs in pathways to blow up vehicles, conducted suicide attacks, and used terrain to their advantage in battles. They took cues from Iraqi insurgency tactics to fight US/NATO and ANA in fact.
This much was expected.
But do tell me if any country can fight a war in a landlocked country the way it wants to?
Short answer: NO.
Pakistan had its interests to preserve in the region and chose to save Afghan Taliban.
Still, war in Afghanistan lasted 20 years and it was concluded through negotiations. US/NATO managed to dismantle Al-Qaeda Network (primary target and objective) and Afghan Taliban accepted their condition for not allowing Afghan soil to be used against them.
Now the thing is this: Afghan Taliban and TTP support each other and Pakistan have to deal with both. I see nothing to rejoice in this matter.
Who won or lost in Afghanistan is useless argument, therefore.