Hello and welcome to CC!
What you're wrestling with is the age-old "problem of pain". Why, if God is both good and powerful, is the world still broken?
The answer is simple but not easy to digest. God created a world that was good but had the potential to become bad. Because of Adam's sin, the world did become bad; the ground is cursed so that it causes pain and suffering rather than blessing. Further, the spiritual enemies of God taught humans many things that resulted in making things worse for humanity, and finally, humans as a group rebelled against God's directions. In short, we humans are broken, disconnected from God, and we live in a broken world.
Yet God has not stopped being both good and powerful. From the beginning He planned to redeem mankind from this broken world first through the forgiveness of sin won for us by the death of Jesus Christ on the cross, and secondly by the eventual destruction of this broken world and its replacement with a new world where there will be no pain or death.
In the in-between time we call our lives here on Earth, we do our part by making the world around us a little better, helping those who need help, and seeking God's intervention to keep the brokenness to a minimum. Our trust in Him welcomes His work both in our lives and our hearts. It's a cycle of increasing trust and faith that will carry you through greater challenges. God isn't finished yet, and we do well not to pass judgment on these things until He is finished.