How did totalitarian governments gain power in Europe?

Nazi Germany: The weakness of democratic institutions and the economic turmoil by the Treaty of Versailles and the Great Depression in the Weimar Republic of Germany opened the doors for the Nazis under Adolf Hitler to come to power----basically through a democratic election.
Soviet Union: The authoritarian monarchy of the Czarist Russia was cruel and unjust on Russia's poor people, and that galvanize a revolution under VI Lenin. WWI brought the weakness of the Czarist regime and when the February Revolution occured, where hundreds of Russians in St. Petersburg were gunned down by the Czar's Imperial Guards, the Czarist regime ended and opened a power vacuum for Lenin to takeover after the overthrow of the weak provisional government.

Nazi Germany and the Soviet Union were Europe's two big totalitarian twins, while all other totalitarian governments were basically propped up either by Soviet or Nazi occupation or through Communist-led post-WWII liberation as in the case in Yugoslavia and Albania.