Idiom: Blessing in Disguise

A blessing in disguise: Something good that isn’t recognized at first.
Example: Being caught in that traffic jam was a blessing in disguise. If I hadn’t missed the flight, I would have been on that plane when it crashed.