Nations with an unwilling population and military tend to surrender. If not outright, at least on the battlefield. Especially against an army that is 4x their size, from a population 3x as big and whose heavy gear far outclasses them in many military asset classes. This is fairly common sense, so why are you asking this question?
Look at Afghanistan as a counter example. For whatever reasons, the population/military/government wasn't unified in opposing the Taliban. All the pushing and prodding from the US didn't change that, although the collapse was unexpected and unexpectedly swift.
As other counterexamples, look at Vietnam, where the population also didn't really "massively support" the US puppet governments. Or the early days of the 2003 Iraq invasion, where the population and military were subject to a dictatorship, about as far from "expressing their opinion" as one gets. Combat collapsed extremely quickly because they did not want to fight. Just to resume as a guerrilla later, when the US occupation regime was sufficient resented (albeit with the help of some fundamentalism).
Another data point - the list of pro-Russian riots in eastern cities in 2014. You'll find Kharkiv and Mariupol there, among others. This is the same Mariupol whose defense would have made Stalingrad's 62nd Army proud. The same Mariupol whose civilians have been massacred. And the same Kharkiv that has been pushing back Russian troops surrounding and bombing it. Whatever pro-Russian sentiment existed before, it seems to have mostly disappeared.
Is there propaganda going in Ukraine? Coercion? Let's not be naive, this is a war and not everyone is going to agree with fighting it. Western countries have all sorts of mechanisms to suspend some of the normal civic rights during wartime (starting with martial law). And, relevant to this question, conscription. But the results so far (remember that, pre-war, military experts gave Kiev less than week to hold) indicate that the population is engaged beyond expectations.
Had Putin fully invaded in 2014, things might have been different. But Ukraine has been getting screwed for 8 years, so they, including many of its ethnic Russians, seem to have developed considerable resentment towards Russian aggression - hence the ongoing resistance. Additionally, as a comment says, the horrors of Bucha and Mariupol also give plenty of incentives to keep on fighting. And so do Putin's claims that Ukraine is not a real country.
p.s. Regarding fleeing the country, a good deal of the refugees are not necessarily combat-able (women and children). And Zelensky recently ordered civilians to leave front line areas to avoid becoming hostages (Mariupol) or being commandeered by Russian forces later (Kherson).