The US populace is vastly larger and better armed and capable than Afghanistan.
The US military requires a massive economy to function. If it tries to attack itself, those little armed people could stop it, the economy would crash, and the US military would crumble without needed support and supplies.
A final issue is the US troops would lose a lot of soldiers if they were told to go attack fellow citizens. The soldiers would quit, would hesitate, would not want to kill people they view as their own people.
So armed citizenry absolutely have major power against the govt.
Finally, if you were in a country where the govt set out to kill its citizens, would you rather have arms or be completely unarmed?
All being said, I am no military guru and I could be wrong
We had no military objective in Afghanistan.
Our only goal there was to enrich contractors who had stockholders working at the highest levels in the Pentagon and White House. That goal was achieved spectacularly.