Populism is a range of political stances that emphasize the idea of the common people and often position this group in opposition to a perceived elite group.
a political leader in a democracy who gains popularity by arousing the common people against elites, especially through oratory that whips up the passions of crowds, appealing to emotion by scapegoating out-groups, exaggerating dangers to stoke fears, lying for emotional effect, or other rhetoric that tends to drown out reasoned deliberation and encourage fanatical popularity.
https://en.wikipedia.org/wiki/Populism
https://dictionary.cambridge.org/dictionary/english/populism
https://www.merriam-webster.com/dictionary/populism
You’re probably thinking of a demagogue:
https://en.wikipedia.org/wiki/Demagogue