Get out while the going is good. meaning

HOME PROVERBS

leave

Get out while the going is good.

suggests that:
You should leave, escape, or extricate from some place or situation while you have the chance, before conditions worsen and becomes impossible, or too dangerous to do so.