I read that after Lenin's death, Trotsky was more popular and Lenin had even declared Stalin was not to remain in power. How is it that he managed to get the power even after this happened?
Hey mate, this has been asked before.
There are some good answers in there, Id love to hear some more though!
The first comment in that thread sums it up pretty well. A good TL;DR would be Trotsky was distrusted by others in the Party competing for power after Lenin's death and Stalin carefully manipulated these power struggles so that he ended up on top by the 30's.