I believe the biggest problem the Soviets had in Afghanistan was US Stinger missiles. If I remember correctly Afghani’s were getting their buts kick until Stingers showed up.
Wikipedia:
However many Russian military analysts tend to be dismissive of the impact to the Stinger. According to Alan J. Kuperman, Soviet leader Mikhail Gorbachev decided to withdraw from Afghanistan a year before the mujahideen fired their first Stinger missiles, motivated by U.S. sanctions, not military losses. The stingers did make an impact at first but within a few months flares, beacons, and exhaust baffles were installed to disorient the missiles, along with night operation and terrain-hugging tactics to prevent the rebels from getting a clear shot. By 1988, Kuperman states, the mujahideen had all but stopped firing them.[124] Another source (Jonathan Steele) states that stingers forced Soviet helicopters and ground attack planes to bomb from higher altitudes with less accuracy, but did not bring down many more aircraft than Chinese heavy machine guns and other less sophisticated antiaircraft weaponry.”
Putin was not head of Russia then.