The following is a solution to a problem that is practical, rather than theological.
The problem of evil is a tension between G-d being all-powerful, all-just and all merciful; and the existence of evil in the world. The just should not suffer. The unjust should not prosper. Yet both do, daily. Since G-d is all powerful, why did He not create a universe in which evil doesn't exist, cannot exist and doesn't need to exist? Why has G-d made an imperfect universe that contains evil? Because G-d is perfect.
Perfection creating perfection is redundant, and pointless. Instead, G-d created a universe in which there are layers of existence, with perfectibility built in to higher life forms. They are given free will to choose between good and evil. Revelation provides guidelines to know the difference, and inspiration to use them. The universe, and some of its inhabitants have the capacity to self-perfect through improvement over time. The universe contains good, and the ability to use freedom to succeed. Freedom to succeed also entails freedom to fail.
Intervention at every point of failure is just as cruel as a parent who always does their child's homework. The home work will be correct. The child learns nothing. The child does not grow, mature, and become self-sufficient. Like a wise parent, G-d allows for failure, but provides abilities, guidance and motivation for success. Evil exists because G-d, in His wisdom knows that free will and guidance on how to use it, plus motivation is kinder and results in a more sustainable good creation than simply perfection creating perfection. This poses a practical problem.
We live in a world that contains both good and evil. Good isn't a practical problem for us. Evil is. It causes avoidable suffering. Why enter into a relationship with a Supreme Being to whom you cannot count upon for a problem free existence?
In our own lives, as children we daily disappoint our parents. We also fail family, teachers, friends etc. As parents we let down our children, spouse, co-workers, communities etc. If the only relationship we would enter into is a perfect one, we would all be the more lonely, and our lives the more shallow and unfulfilled. Relationships are hard work. Married people know this only too well. Romantic notions aside, we have to work on our marriages daily to make them thrive. We do so, and stay in them because our lives are better within them than out of them. If that were not true, we would close them out.
So it is with the problem of evil, and our relationship with G-d. We keep G-d in our lives because we choose to do so. We elect this because our lives are all the fuller for it. We use our free will to try to make this imperfect world better than it is. That is because we have to live in it. We also want a better world for our children. We can improve ourselves and the world. We can do it better with G-d in our lives than excluded from it. We cannot eliminate evil. We can try to lessen it. G-d is a part of that process for us, not a magical cure all.
May G-d bless, Enoch.