So, to get to space requires a certain amount of rocket fuel (in proportion to the weight of the spacecraft). To get to an orbit around the earth requires more fuel, due to the orbital speed required. To go to the moon requires even more.
This information is summed up very nicely (albeit a little technical) in this diagram here: https://i.imgur.com/WGOy3qT.png
Now to carry people, you have to be able to carry them, their "infrastructure", extra vehicles they might need (landers, etc). You probably also want to bring them back, preferably alive and not burned up in the atmosphere. This is all more weight that has to be lifted. Don't forget that you also can't accelerate too fast, as human bodies can't withstand the g forces that a satellite can!
So to use an American example- the Mercury Redstone which barely got a person to space weighed roughly 33,000 kg. The Saturn V weighed roughly 240,000 kg to take 3 people to the moon. Now I'm sure you could reduce some of the weight by only taking one person to the moon, but realistically it wouldn't be that much different.
So now to get to the moon with people you need 3 things:
So- the Soviets:
Like the US, the USSR realized they needed a much bigger rocket to get to the moon. They knew how to build rockets, they knew how to put people in rockets and bring them home, but they needed to scale that up. Way up.
Enter the N1. The N1 was the Soviet version of the Saturn V. But unlike the Saturn rockets (there was also a Saturn 1B), the N1 never worked right. It tended to go boom, usually without getting far off the pad. The reasons for the explosions are several, but basically boiled down to. 1. It was a crazily complex piece of machinery. 2. Testing on it was more "Let's burn this candle!" than anything else.
This was all compounded by the death of the Soviet chief designer- Sergei Korolev in 1966 (before any N1 flight attempts were made). Not to say that the N1 was solely his design, but he was definitely the glue that kept their space program running and innovating.
Now it's July, 1969. The Americans have had several successful Saturn V flights and they're on the moon! Meanwhile there have been two attempted N1 uncrewed test flights.. both of which ended in a large kaboom. Neither one made it into space, much less to the moon.
Afterwards, there were two more uncrewed N1 flights, both of which also ended in kabooms. By this point, the political drive to get to the moon in the USSR was waning, and it was obviously that technologically they were way behind and not catching up. So yeah- space program- you're costing us a lot of money! And those kabooms are cool, but really- not what we're paying for.
At this point, the Soviets decided to focus their attention (rubles) on other things, like the space station Mir. Less kabooms there! Also other things that didn't pan out like the Buran space shuttle.
Now if you're asking "Could the Russians do it today?" The answer is they probably could, if they had the political capital. But space programs (kabooms or no kabooms) are expensive and they have better things to spend their money on.