The general system of God is that He delivers Rizq (sustenance) to all. However, there are exceptions:
1- When people themselves commit injustice. Evil people can make others die and starve. Now God can stop them of course, but life is a trial. The evildoers will be held accountable and those oppressed will be compensated.
2- God tries us through difficulties and tragedies. Even very good believers will go through difficulty. See Al-Baqara 155. Allah tests us with loss of lives and hunger. And those who remain patient Allah will reward them and take them to heaven.
3- Such tragedies and difficulties remind us that we were not created for earth. Earth is a temporary transit hall. Our final destination is the Akhira. And the proof is that there is so much pain and suffering in earth. If there was no pain and suffering no one would care about the Akhira.
4- Such pain and suffering also teaches us to appreciate out blessings, not take things for granted, and use God’s resources justly. So it’s a learning moment.
All these points apply to this current pandemic.