They did, but the N1 booster that would have gotten the upgraded Vostock/Soyouz type capsule and lander into low Earth obit for departure to the Moon kept blowing up shortly after launch, or right on the pad.
They definitely did/do have the tech, but they were saddled with procedural and bureaucratic issues that made it difficult to respond effectively to engineering flaws in the designs. They gravitated towards designs that had dozens of smaller rocket motors, which increased the number of failure points, more plumbing, more controls etc. more complexity IMO, whereas NASA and the Apollo program contractors threw all their effort into the Saturn V's five MASSIVE F1 engines and making them absolutely FLAWLESS, which are still engineering marvels to this day.
The situation was somewhat reversed when the Russians had MIR and simple and reliable Proton launchers and Soyouz capsules, and we were limping along with the fragile and overly complicated Space Shuttle.
Rocketdyne really did an amazing job with the development of the F-1, they even came up with an F-1A, which was more powerful, yet 33% lighter, and was possibly slated for post Apollo space-station building projects, and Mars missions with the Nova booster, but the contraction of NASA under Nixon, and the unrealistic promises of the Space Shuttle program killed it.