I'm not from the region, so I can only do armchair historical analysis.

The Eastern EU former Warsaw pact states should come to Ukraine's aid and provide the security guarantees to maintain a ceasefire. This is going to be Poland, Finland, Estonia, and other Baltic states.

They should be willing to break ranks with Western EU to make it happen. Doing it under NATO likely hamstrings them, so they should form their own alliance against Putin.

This would serve as an effective bulwark to Putin's territorial aims. It reduces Ukraine's dependence on the shaky Western politics and secures peace in the region. Ukraine should be willing to give up some territory to Russia if this option becomes viable.