That is a hard problem. The classic book The Problem of Pain is a quality attempt at addressing it but TBH when we're going through tough times that feels like an academic exercise rather than comfort. Pray and even challenge God to show that He is real and tell Him that you need His real help.I don't trust god one iota. Think about it, why did he choose to put us on a planet where there is UV light, earthquakes, hurricanes, tornadoes, tsumanis, countries that historically cannot get along, on and on? Does anyone actually have any proof that a "heaven" exists? We have to accept an extreme life to be worthy of god's love? Is god a narcissists? Have you ever met a narcissist in real life? Sickening.