There isnt an easy answer. I would provide Ukraine full support. I mean just about everything other than the cutting edge stuff. Ukraine gets to join NATO, etc. Im fine if it is with or without a minerals deal. Make it too costly for Russia to continue.
Any peace without Ukraine joining NATO or another mutual defense pact with nuclear powers means this war restarts in 8 to 10 years.
Plus, if a peace does not include that, they would develop nuclear weapons in any sort of pause. They have plenty of fissle material and have a formidable balistic missle industry, which is more advanced than North Korea.
Gotta play hardball with a dictator and attempt to prevent nuclear proliferation.