Actually, Ukraine doesn't have much rare earth minerals worth mentioning and it had/has zero operating mines for these.
But Ukraine does have a lot of strategic mineral resources such as titanium, lithium, beryllium, manganese, gallium, uranium, zirconium, graphite, apatite, fluorite and nickel.
So Trump made an ignorant comment, at least regarding rare earths.
But seeing as most of the deposits of the minerals I mentioned above are now in Ruzzian-Occupied territory, I'm thinking it's okay if Trump is mistaken, while of course these minerals are of strategic importance, and that's an important reason why Putin and his accomplices should not be allowed to have them.
So I hope Trump secures these resources.