C. S. Lewis’ books “Mere Christianity” and “The Problem of Pain” address this issue very nicely.
It is actually logically much simpler than one would think.
I’ve not read either of htose despite havign hte ‘mere christianity’ awhiel ago- never got aroufd to reading it. C.S was quite smart for sure.