What do you do when your plans are crushed?

What do you do when your plans are crushed?

Do you give up or do you re-group and arrange for plan B? Take new actions? It is so easy to get yourself down and think: -“my opportunity is gone” or -“”my ideas are taken, now I have to find another dream or different path to something else,...