Both Hitler & Napoleon benefited from being able to point out those seeking to destroy them; the Versailles treaty and the campaign of the European monarchs to overthrow the French Revolution were great rallying points for the German and French populations respectively.
“Mein Kampf” isn’t a great book, but it explains a lot; definitely one of the saddest books written. Hitler explains away his failed art career with WWI poison gas damage to his eyes, but he didn’t wear glasses afterwards.
A lot of Mein Kampf (early parts) read something like the similar bits of Orwell’s “Wigan Pier”, in the explanation of his class anxieties and the nature and problems of the lower classes in those times.
Unsettled times are an opportunity for new leaders. The French certainly went through a lot of them pre-Napoleon.