Yes, sanctions are wasteful of resources, which could lead to food shortages and people dying, but that's kind of the problem with war: It kills people and wastes resources. Even without sanctions, there would be many Ukrainians (and Russians) killed, and Ukraine would not be keeping up its wheat exports. Ideally, we'd like to prevent this kind of thing from happening very often, which in practice means there needs to be some kind of deterrence against strong countries invading their weaker neighbours. Since western powers can't fight directly against Russia, as it would risk nuclear war, sanctions are one of the few tools available for deterrence. Sanctions aren't about waving a blue and yellow flag or about showing how much you care. They're about preventing similar future conflicts and hopefully giving Ukraine a better negotiating position so the war can end sooner.
Also, it seems like European and North American sanctions shouldn't be a problem for most poor countries unless they're also participating in those sanctions themselves? While sanctions make sense for rich countries, the first priority should definitely be to feed your own people. So if the government of India decides that in order to feed its people, it needs to import potash from Belarus, more power to it.