idiom
when one door closes, another opens
Meaning
when one opportunity is lost, another appears
Example
Don’t be upset about the rejection—**when one door closes, another opens**.