There are same major differences here. Ukraine is not Afghanistan. It's on the doorstep of the EU. Literally. And Russia's stream of promises of belligerence beyond Ukraine does keep motivation among Eastern Europeans going.
Here in North America, I think it's easy to say we should quit on Ukraine. That's not how a Pole or Balt or Scandinavian sees it. The threat is far more relevant and imminent to them. And unlike the past, as both EU and NATO members, they have substantial control over policy. The US can make peace with Russia, but the US doesn't really trade with Russia. It's only Europe that really matters in this regard. The US is relevant insofar as it brings a ton of arms, and sanctions abilities with the USD. And there's no incentive for the US to lift sanctions even if they end arms supplies.
The war has stablemated. But that does not mean it's over or can't evolve very very quickly. Both sides are rather thin on the ground. And higher production by either side would actually allow an advantage to build up substantially. It's for this reason that lots of people called for substantial aid to Ukraine early. The West really screwed up here.
Beyond Ukraine, if Russia insists on being a long term threat to the Baltics, Scandinavia and Poland, NATO will really need to develop strong defences and deterrence to make sure Ukraine doesn't happen again. And Canada aside, there seems to be genuine interest and efforts on the part of Europe to do this. Not just increasing defence spending. But the speed at which they reduced dependence on Russian oil and gas has been incredible. I don't think Putin ever predicted that. And if China, Iran and North Korea keep backing Russia, I do think the Europeans will come around on Cold War 2.0. they are starting to get very prickly towards the Chinese.