No, he wasn’t. He was appointed. His party won the largest number of seats, but not a majority, and Paul von Hindenburg won the Presidency. The problem is that the party with the largest representation got to choose the Chancellor, so obviously the Nazis picked Hitler. In theory the President needed to agree to it, unfortunately they were Nazis so, ya know, not big fans of mutually beneficial compromises.
Then Pauly Boy let them pass the Reichstag Fire Decree and the purge of opposition began.
The power sharing at the time was a bit convoluted but eventually he’d force the Presidency into irrelevance and then, eventually, just take the title too, for shits and giggles.