Before the show starts, jingoism is emergent and it ought to be illegal to rattle sabres and call for blood where peace is still possible. That changes quickly, there is a definite threshold.
Once the game is on, one has to move with the crowd. To not support the war is demoralising, treacherous even. And this rises as the first body bags come home and mothers weep.
In the middle phase, people are stoic and quiet. Soldiers have "a job to do" and we must "grin and bear it".
Without swift victory, then comes the point of fatigue and economic pain. Too many dead children on the TV. But the protestors are in a minority and need great courage to point the way to an exit. That's when tactical silencing of dissent can happen. The idea that opposing the war is the same as siding with the enemy comes to the fore.
As the tide turns, even millions on the streets (Vietnam, Iraq), or the advice of generals (Afghanistan) cannot overcome the pride of miscalculating leaders. But at that point public opinion has passed the threshold the other way.
By the end it is shameful to still support a lost war (and sometimes, depending on the cost, even a victorious one).
Long before it ended WWI was universally seen as "insane" by all sides.
Perhaps my historical education is wanting, but only the second world war seems to have a clear narrative of victory over evil, with a constancy of support for Allied triumph which I think even the exhausted Germans and Japanese felt toward the end. That "just war" model is wheeled out and is still active apropos Ukraine.