a blessing in disguise
Meaning
something bad that turns out to be good
Example
“Losing that job was a blessing in disguise; I found a better one.”
How to use it
Used after the good result is known, not as a prediction.
A literal picture
A wrapped gift hides behind a dark cloud