God is in full knowledge and in control of things.
LINK
Although it may seem contradictory, God uses all the events that happen in this world, even suffering. In his wisdom he allows everything for good.
For we know in part, and we prophesy in part; 10 But when that which is perfect comes, then that which is in part will come to an end. 11 When I was a child, I spoke like a child, I thought like a child, I judged like a child; But when I was a man, I left what I was like as a child. 12 Now we see through a mirror, darkly; but then we will see face to face. Now I know in part; but then I will know as I was known.
1 Corinthians 13:9-12
We know from the word of God that he is good and has absolute control of all situations, but this does not exempt us from the fact that at times we go through things that we do not like, bad things, we understand that the trials that occur They are to increase our faith and just as we also lead other people who do not know God through the circumstances that they cling to or know God. God also uses those difficult circumstances to mold and transform us into his image and likeness.
God is faithful and his written promise says that he has done everything And everything that happens is only for our good, God allows trials so that we develop and mature from the experiences we experience. Trust, knowledge, love and compassion among other things are characteristics that we develop throughout our lives. If we stop for a moment and observe all our past situations we can see that the Lord in his absolute power and sovereignty was working to achieve in us the desired purpose.
28 And we know that all things work together for good to those who love God, to those who are called according to his purpose.
Romans 8:28