Some of the bordering nations (Baltics, Poland) are dumping massive amounts in to try and win the fight in Ukraine now, so that it doesn't spread to their nations. They see a kindred spirit in the Ukrainians, and believe they can win (and believe they have to win) in Ukraine. If things go south with Ukraine and Russia continues into the Baltics/Poland, they didn't have the manpower to fight Russia to a standstill anyways prior to February, and they know that the rest of NATO will deploy into their nations to fight Russia, but they still want to prevent that by backing Ukraine to the hilt.
You also have NATO nations that are farther back, who maybe believe that things will still go south in Ukraine, and that all of the sudden they are fighting Russia in Poland and the Baltics, and so they are keeping their hardware ready. Some of them do not produce their own military hardware as well, or are limited in what they produce, and so they rely heavily on the US/UK/France/Sweden/etc. and if things go south, they won't have time to wait for new hardware if they've donated a lot already to Ukraine.
And a few are perhaps being cagey with the donations because they may have let training and maintenance, etc., lapse, or had a lot in storage, that wasn't maintained. They were coasting for years because they had a helluva buffer with Ukraine/Belarus/Finland/etc., and all of the sudden, people are yelling for them to donate stuff, and they are perhaps trying not to reveal any weaknesses out of embarrassment or whatever. I think this could be true especially in regards to Soviet-era hardware being stored away.
I don't think it's a coincidence that the Baltics and Poland have donated so much, and I don't think it's a coincidence that the US/Canada/UK/Australia are all donating a lot - in that last group, three of us have oceans between us and Russia, and the UK has solid seapower. Short of nukes, no battles will be fought on our lands, so we have the luxury or pumping a lot of hardware into Ukraine. Plus, some of us, especially the US, are transitioning between weapons systems (IFVs, etc.), so it's easy for us to dump older, but still solid hardware into the fight.
And it's not a coincidence that so many countries have donated small arms/ATGMs/etc., not just because they are easy to donate and relatively easy to replace, but also in the case of things like ant-tank missiles, if they are used in Ukraine, they will in theory be destroying tanks/IFVs/etc. that the Russians will then not be able to use if they move past Ukraine.
I could be wrong, but I know the Baltics/Poland are heavily invested in Russia failing, and it's not just emotionally, and I also get a sense that some NATO nations are nervous about having to fight Russia beyond Ukraine and so maybe want to keep artillery/etc. in their own country in case of that.
Putin and Co. have been sending clear signals that they won't stop with Ukraine, and the justifications they have used for Ukraine could be used for opening a land corridor to Kalingrad, and could be used to try and bring the Baltic states back into the fold.
Now I think the chances of them moving beyond Ukraine are extremely low at this point (Georgia would probably be the max) - Russia can't even get to the Dniper, they won't be able to take Odessa, etc., but Putin and Co. are still running their mouths way too much to and it makes a lot of Europeans nervous that he wants to return to some kind of USSR/Russian Empire.