War requires a complex logistical system, from delivering everything from food to munitions. So how is a guerrilla force, such as the Taliban in Afghanistan, able to feed and acquire enough ammunition to effectively fight, especially when guerrilla warfare places an emphasis on not holding land, and thus an industry to produce weaponry?
Safe houses, storage facilities, people sympathetic enough to the cause playing their parts at various points - but more than anything, either economic or geopolitical support from benefactors. Don’t discount greed - war is a great economic stimulus to encourage the profit motive. High sustained volumes of low-input consumables like food, ammo, water, basic supplies, and durable goods that get blown up and need to be replaced (weapons systems, vehicles, logistics equipment).
They get what they need hidden in local economic activity. The only thing that truly stops a guerilla insurrection is total scorched earth and depopulation of the disputed area, so that no economy really exists, certainly not one that can support hidden transfers of materiel. Even that takes time for a well-stocked insurgency in challenging terrain, if they already have their men in place. Guerrillas can’t replace or manufacture vital supplies themselves, but the profit motive for local players is a powerful thing. The Viet Cong’s utilization of the HCM trail, like other hard terrain combat zones, aided the longest part of the journey from distribution points, harbours and rail depots in the north to the supply points that the infiltrators used to take it the ‘last mile’ to where it would be used, but they also lived off the infrastructure and purchased/stole supplies inside Sourh Vietnam as well, with well funded benefactors in China and USSR. Had political and public will allowed it, the US would have had to invade North Vietnam and utterly destroy or occupy the input points for the Soviet and Chinese air, rail and sea supply points. That becomes an occupation nightmare, again unless you’re ruthless enough to force millions of people out of the urban distribution points that can process the volumes of stuff required to make an insurgent army go. Once the stuff gets off the dock, out of the warehouse or unloaded from the rail cars - forget it. You’re never going to catch enough to move the needle if you don’t control the ground closest to those distribution points. The world is really damn big and armies are smaller than the populations they move through.
That intensity of total societal destruction warfare is not really tolerated since the second half of the 20th century. Thus, guerrilla movements can operate within the normal profit motivated markets they’re fighting in. Many players in the supply chains will of course not even be aware or be willfully blind to their part in supplying insurgents. Money is money and war is good business. It makes legendary fortunes.