Eventually, Joseph said to his brothers, "Even though their intentions were to harm me, God's intentions were for my good.".
It's a way we can't imagine: from Above, everything is good. Any evil we perceive in the world is subjective.
Even the times we make mistakes and send our life story into a sharp downward spiral, even those stories are ultimately for the best.
And, on the contrary, the best things eventually come from our worst mistakes.
All that is required is that we learn from our choice, accept the blame, and resolve to do things right from now on.
That done, all the wonderful things in this story of your life shine brightly.