https://youtu.be/7EEHwDjlKjU?si=L3DjOsWVA87L8osl There are many things which we cannot explain. We are left with inability to understand and explain why they happened. Yet, God is just in all His ways. Whatever He approves and allows is right. We are mortals. We only know in parts. It is God who knows all things. God knows why He allows some of the things which we are seeing. One thing is very certain - God is still in charge.
The Bible says that God takes away the righteous because of the evil that might be coming. The way of the righteous is before the Lord. So, we can be offended because of losing a loved one. That should not bother us much. We should understand that God is good in all His ways. So, God takes away the righteous person so that he will not be taken by evil. He is not willing that any should perish.
The Bible also says that God gives the wicked long time to repent. He does not quickly judge the wicked. His long suffering and endurance is to see whether the wicked will turn away from his wicked ways.