Afghanistan is where empires go to die.
Alexander the Great circa 330 BC conquered Persia in 6 months and then spent nearly 3 years attempting to subdue Afghanistan. The losses incurred and the resistance faced were some of the contributors to the eventual fall of his empire following his death
The British had three Anglo-Afghan wars spanning the 19th and early 20th centuries. The end result of these struggles were heavy British losses as well as the end of British military influence in Afghanistan
The Soviet Union attempted to capture Afghanistan in it's sphere of influence by spreading socialism there. While it initially gained traction, religious and tribal forces within Afghanistan resisted and this led to the Soviet-Afghan War. With help from the CIA and Arab/Muslim fighters from other regions, the "Mujahideen" succeeded in drawing the USSR into a protracted struggle that many believe led to the end of the Soviet Union. (the pebble that cracked the Soviet Empire)
It can be argued that the US conflict in Afghanistan which began in 2001 and continues to this day is another example of technological and military power being unable to subdue the tribal forces of Afghanistan
Afghanistan has gained the moniker “Graveyard of Empires” for causing superpowers to overestimate their odds of victory and overextend themselves in attempting to conquer it.