Just letting Russia steamroll over Ukraine at minimal military and economic costs to Russia would have enabled and emboldened Putin to perhaps attack another country a year or two down the road, so he could jerk it more to his Soviet-era nostalgia.
If any good comes from this with all the death, destruction and economic supply disruption it has caused, it's that even if Russia succeeds in large parts of Ukraine, it will have come at such high costs that they will not be able to launch a large-scale offensive against another former Soviet state anytime soon.
Hopefully, it buys Europe enough time for Putin to die off and a more open, democratic society finally emerges in Russia.