It's never been about rare earth minerals. It's always been about food production.
The European Commission reports that Ukraine accounts for approximately 10% of the global wheat market, 15% of the corn market, and 13% of the barley market. Moreover, the country has earned the distinction of being the world’s largest exporter of sunflower oil, with a staggering 50% of global exports. Additionally, Ukraine ranks third in barley production, fourth in maize production, and fifth in wheat production. In 2021 alone, Ukraine exported cereals worth close to $12 billion, further solidifying its prominence in the global food market. Source
If Ukraine’s depleted agricultural GDP has been a boon to Russia, the rising global food insecurity that has resulted from Russia’s war has also been beneficial: Ukraine’s diminished exports have created openings for Russia, another major global agricultural exporter, to make up for Ukraine’s losses, with Russia using its agricultural exports as a source of soft power. In early 2022, Dmitry Medvedev, the former Russian president and current deputy chairman of Russia’s Security Council, declared food to be Russia’s “silent weapon.” Source