I think there are probably many reasons. I would say race may be part of it, for some people, but I really don’t think it’s that simple and I don’t think it’s the biggest one.
Firstly, Ukraine is a European country, so more likely to have diplomatic ties etc causing greater impetus at governmental/diplomatic level which explains the response from there. It is happening in Europe, in a country some will have visited (and most will have heard of). It seems closer to home, it is recognisably western and people can picture it happening to them.
The media publicity adds to that- and this is war in Europe, something that hasn’t happened since world war II. It’s having a huge impact on Europe, and the world. It catches attention. They are our near “neighbours” in geographical terms- especially for Eastern European countries, and even places like Germany (as I assume you aren’t totally taking about the UK response)- which is again, going to increase the likelihood of wanting to help them. Other countries, less close physically but are allies of those countries nearest and additionally want to help friends of our allies/support our allies with difficulties. Most people are more likely to help a friend of a friend, than a complete stranger- similar principle, I think.
There is also the fact that there is a very clear aggressor (Russia), who has also been an antagonist to the west/Europe/NATO for a long time. We fear the consequences if Russia were to win, and so we want to support Ukraine in the defence of their nation. We want our “enemy” defeated, not empowered. This makes it easier to support the victims of the injustice that is the invasion of a sovereign nation by another. Other conflicts are harder to relate to- it’s easier to understand Russia invaded Ukraine, rather than the situation in Afghanistan, Syria or the myriad conflicts/civil wars etc in the Middle East and various African countries- who is the aggressor, who is the victim? it’s often less obvious if you don’t know the history of the conflict or who has done what to whom. Take Syria, as an example- an altogether more complicated set of circumstances and it’s harder to definitively/easily identify those who are fleeing war/persecution from those who were actually attacking them but now looking to get out as the country is in ruins (economic migrants). It might not be fair/nice etc, but it is easier to sell an easy “good vs bad” scenario.
Then there is the fact that the majority of Ukrainian refugees are women, children and the elderly. The men are staying behind to fight. Many of the refugees from Africa and the Middle East appear to be young men (though of course there are families too, but statistically I believe there are more line males than other groups). The former groups arouse more sympathy (rightly or wrongly) than the latter. People feel more “safe” offering help to children, families or the elderly. Some will wonder why they are seeking refuge but more women/families are not- are they really economic migrants? Of course, it’s likely this is because young men are more able to withstand the physical difficulty of getting from their country of origin to Europe- elderly/children less likely to cope, so families with children/elderly relatives less likely to attempt it. Such journeys highly unsafe for lone women, so again less likely to attempt them.
Add in that there appears to be a desire amongst the majority of Ukrainian refugees to return home as soon as they are able, once the war is over, and (rightly or wrongly, unfairly or otherwise) many people see it as a temporary helping hand to a country devastated by the Russian invasion and not an invitation for unlimited numbers to migrate permanently. Many are happy to provide that temporary help but are less keen on permanent immigration. And it is also true to that immigration has significant downsides as well as benefits. And yes, racism towards non-white people will be a factor for some.
Whether the Ukrainians will all return remains to be seen, but it does appear more likely that the majority intend to/will do so than Syrians or Afghans, or Congolese or Yemeni or Cameroonian’s going back to their country of origin. Quite frankly, it is extremely unlikely that these refugees will be able to go home any time soon (for example, can you see Syrian regime changing in the next few years?), even if they wanted to. And many don’t want to, never did. Not that I blame them- in some cases they can’t go back because of persecution for political or religious reasons, for example. For others, there is no desire to return because their life here will be better than returning to a war ravaged country that wasn’t wealthy prior to conflict/civil war/political upheaval etc.
So you see, I think there are a complex of factors, some interlinked, which drive the response to Ukrainian refugees which is lacking for others. And only a small part of that is simply down to racism, IMO.