No, that was different in several ways:If they can load people onto planes like they did in Afghanistan, they can do the same in Ukraine. I assume there was next to no vetting/screening done there.
-First was the 'opponent' was not a significant risk in terms of attacking flights (Taliban had basically no air force and wasn't targetting aircraft) - there was a tacit agreement to let the other countries involved use the airport to evacuate (for a period). Most of the 'action' was outside the gates of the airport and whether individuals could get to the airport anyway).
-Canada and other countries like US were doing vetting/screening - they'd issued documents for those allowed to board those flights, and they were operating those flights semi-jointly (those with documents issued by one of several countries could board the flights of others, IF they could get to the airport and through the gates.
-Those people in Afg who were issued documents before/during the immediate phase of that crisis were to a very large degree people who had worked for the Canadian armed forces, government, or news media that had been working for some time on getting them status (and far, far too slowly processed by IRCC in my opinion). They were for the most part NOT unknown quantities. (BTW some were issued not visas but 'promise documents' and some of them still stuck, I understand).
-The flights done by Canada didn't come direct to Canada but to some intermediate location (I think in Germany). A fair number left on flights operated by other countries and some of them ended up in Ukraine (Ukrainian military in Kabul was very pro-active in helping get some from the city to the airport, essentially saving the lives of some coming to Canada by the way). I know some were reportedly still in Ukraine when Russia attacked (not sure any of those were those who were supposed to go to Canada though).
Ukrainians are mostly fleeing by land to neighbouring countries that are not an immediate security risk. Fortunately European countries have opened their borders (waived visa requirements) and are (in huge numbers) being hosted in private homes. (And very generously, have some contacts that are doing this - in some cases several families).
It's perfectly understandable and logical that Canada would take the position that the immediate, short-term needs for shelter and food etc are best addressed directly in Europe. (Transport costs alone to Canada would absorb lots of money compared to eg food in Romania or Poland).
If Canada has a strength or advantage (compared to what can be done in neighbouring countries and compared to just giving money to help them there), it's willingness to accept refugees/those who fled for longer periods (again, transport costs) and to let them work for some period, possibly years, as well as Ukrainian/Russian speaking communities and family links that are willing to host and help.
Could/should IRCC do it more quickly? Sure. Maybe. Arguably. (Let's see how they implement).
But it's not very much like Afghanistan - not at all really.