The whole Bible can be read as an extended solution to the "problem of evil."
God works on cosmic rather than worldly scales. Any pain or suffering that humans experience in this life is extremely fleeting in comparison to the whole of eternity. God has secured eternity for us through the atoning work of the cross. Christus Victor! O death, where is thy sting?
Why didn’t God just create us all already in heaven then? What’s the point of the brief prelude in this evil-ridden world?
He did. It was a choice to come here to not just randomly be here, but to learn and one day become him.