Korolev (pronounce: Karalyov) died in the mid-60s, just before the Moon program had started to gear up for the big time. Khrushchev was ousted also during the mid-60s by retrograde bureaucrats.
With both the political and the technical leadership in turmoil, the program fell on very hard times. The didn't get enough funds, could not get proper testing done, and pushed a lot of QA to the live launches. Predictably, the results were "spectacular" - but in a bad way.
A little before that time America finally got its resolve together ("We choose to go to the Moon in this decade and do the other things, not because they are easy, but because they are hard...") and started pouring massive amounts of financial and engineering efforts into its space program. Again predictably, the results were spectacular - but in a good way.
If your leadership is indifferent and you don't have the stuff you need, you lose. If you work hard and put all your energies into it, you win. And that applied to both sides, each in its turn. Who knew?
Good book on this topic (and related):
I wish Korolev was around these days so he could see Elon Musk's multi-engine design. I think he would like it. In a (somewhat vague) sense, I see the Falcon Heavy as late vindication for the tremendous efforts, against all odds, of the engineers who busted their asses trying to shoot the N1 into the Moon. The idea was sound, it was just not yet the right time for it.