The Americans pulled decisively ahead of the USSR during the Gemini missions when the Soviet programme was effectively grounded. Their Voskhod manned capsules were death traps and the Soyuz programme was well behind schedule and of very poor quality - let's not forget Soyuz 1 killed its pilot.
Gemini on the other hand showed the Americans could manoeuvre freely in space, conduct long duration missions and repeatedly perform rendezvous - something the Soviets did not master until much later. At the same time the Americans had perfected large rocket engines and were able to get their bigger, heavier Saturn V off the pad with just five engines compared to the N1's 30 - which unsurprisingly, didn't work well.
Where the Soviets did score was that when they finally debugged their simple designs they proved exceptionally reliable - it's not poverty that's kept them using the Soyuz and Proton boosters - it's because they've had an epic success with them. And the Soviets did perhaps produce the best main engine ever designed for the N1 - used individually or in pairs it's been a huge success on the Atlas V.