Paradoxically Stalinist USSR would most likely succeed better in quelling the Afghan resistance than the Soviets did decades later. The Red Army had a lot of recent and directly applicable combat experience from crushing the Basmachi movement in Central Asia, and population transfers and general ruthlessness would enable them to create a situation where the new government of People's Republic of Afghanistan mimics the OTL fate of Baltic states and either votes to join to the USSR directly, or becomes a Mongolia-styled puppet regime. But the gains they'd get from such a move before WW2 begins are minimal compared to the diplomatic difficulties, and in OTL Stalin deemed it preferable keep Afghanistan as a harmless buffer state between British India and Soviet Central Asia.
But if such an occupation happens just before WW2 breaks out, this makes Britain extremely nervous about the security of British Raj and complicates the diplomatic relations between Moscow and London considerably. If it happens at the same time as the joint invasion of Iran and under the same pretext of alleged German influence, then the British war-era reaction will be less severe because they are obviously preoccupied by the war and not in a position to do anything drastic.
The British government would still most likely demand post-war Soviet withdrawal from Afghanistan, and it wouldn't be inconceivable that Truman would enforce these demands just like he did with northern Iran in OTL.