From the start, it was USA who pushed toward this war. The goal is to minimize powers of Russia. The solution is to sacrifice the whole region to fight in proxy for her. What to do? Invite Ukraine to join NATO which Russia wouldn't accept enemy armies on its frontieres. Behind the scenes, Europe found itself forced to support Ukraine to forbid Russia from expanding the invasion and to curb its expanding powers as well. The whole situation is strategic based till now. The rare metals appeard later when talking about solutions to stop the war after USA and europe got convainced that it's an expensive war that no one would benefit from except the east camp. What to do? Let's arrange with Russia and blackmail Ukraine.
The United States never pushed Ukraine into war with Russia, nor did it invite Ukraine to participate in NATO expansion. Ukraine's domestic initiative was the primary driver of its desire to join NATO. Political support from the United States and certain NATO allies facilitated and legitimized Ukraine's desire. This, of course, met with strong opposition from Russia. Russia's reaction changed Ukraine's security dynamics and strengthened Ukraine's resolve to seek Western protection.
The large-scale invasion remained Russia's sole decision. Even before 2022, Russia had demanded legal guarantees that Ukraine would never join NATO, a demand rejected by the US and Europe as a violation of the principle of state sovereignty. The US was a key actor in supporting Ukraine after the Russian aggression, but it did not instigate the war. The narrative that the US encouraged the war was used more by Russia and its allies, including China, to justify their military action.