I read an article (or was it a podcast?) years ago from the perspective of a reporter that was often in war-time scenarios. The reporter did a lot of interviews over many years with refugees from those wars. The refugees that were most “successful” were those that seemed to have a sixth sense for when to stay in a particular location and when to move on.
Your career won’t ever have those sort of stakes, but it’s a skill to know when to stick it out on a team and when to move on.