idiom
a blessing in disguise
Meaning
something that seems bad but results in something good
Example
Losing that job was **a blessing in disguise**.