Stalin emerged as Lenin's successor for many different reasons. Stalin was a vicious man with many strengths which helped him gain leadership. He was the quiet one in the Bolshevik party, but appeared as Lenin's loyal colleague after his death in 1924.
Stalin took on the job of General Secretary and that put him in control of the Bolshevik party. With his position, he promoted his friends and those who supported him and he demoted his opposition and gave them boring jobs. This helped Stalin gain power because he got to know the party well. gained a lot of support and could easily infiltrate his influence on the party.
Trotsky believed in the idea of world wide communism. He thought that other countries would like the idea of communism and that there would be revolutions all over the world. This was unpopular among the Russian citizens as they believed Trotsky's ideas were seen as unrealistic.
Stalin was seen as a more popular choice as he wanted to focus on promoting socialism in one country.
Stalin was a ruthless man who was willing to discredit and kill anyone who got in his way. He even discredited his close friends to achieve his goals This helped him get to power as he could get rid of any opposition and scare people into supporting him. At this time he would also ally with members of other political parties particularly on the left. This was to gather more support from various other sources.
As General Secretary, Stalin issued the letters for Lenin's funeral. To discredit Trotsky, who was seen as Lenin's loyal companion, Stalin told Trotsky the wrong date for the funeral. Many Russians were angered by Trotsky not appearing at their great leader's funeral and Stalin took Trotsky's place at Lenin's side,