land on your feet
US /lænd ɑn jʊər fiːt/
UK /lænd ɑn jʊər fiːt/

1.
to successfully recover from a difficult or bad situation
:
•
After losing his job, he managed to land on his feet with a better position.
•
Despite the challenges, she always seems to land on her feet.