Given this industry, switching is always somewhere in my mind. How can I figure out if it makes sense to pursue that or stay? When it comes to staying, how do I know if my current team is conducive to my overall growth and goals going forward?
The not-so-actionable advice here is "when you're not learning or earning as much as you want".
A better answer (more actionable) is that you should be evaluating opportunities and making an active choice to stay at your company. What you want to avoid is staying at a company for 6+ years simply because you were on auto-pilot. So talk to friends about companies they're joining, and I'd recommend even interviewing around at least every 4 years to see how excited you are by external possibilities.
For you and anyone else reading this, I highly recommend making a stack-ranked list of your priorities. Here are some example priorities when it comes to choosing a job:
Seriously thinking through these and ranking them in order of importance is a really formative exercise that makes the picture a lot clearer. From there, you know it's time to leave when your current environment isn't really satisfying your 2-3 top priorities.
Zooming out, here's 2 core angles to consider "in a vacuum" with this question.
The Current Hiring Market
Quality Of Your Team
This topic is so important that we gave a masterclass about it, which you can watch here: [Masterclass] How To Choose A Good Company And Team As A Software Engineer
To learn more about the priorities I mentioned above:
More related resources on the topic of team selection:
One perspective to look at this is to think about what drives you.
First of all, what drives you to stay in your current job? Is it a negative emotion like "if I lost my job I can't pay the mortgage" or "if I quit in this situation people around me would think of me as a quitter for the rest of my life"? If this is true, you should always keep your eyes open and look for opportunities that can drive you with positive emotions.
Opportunities that reduce the negativity may look attractive -- isn't great that the new job pays more when I worry about money in case of losing a job? However, that's not going to drive you better in a healthier way. You can pick up this new job and get paid more but you also get a bigger negative drive -- "if I lose this job I'm leaving even more money on the table!" Be diligent in the trade-off you make in this case.
A better opportunity is one that attracts you with positive emotion. "I grew up poor and I believe I can help people in a similar situation by working on this financial product". "More and more friends in the tech industry are suffering from mental health issues and that makes me want to work in a company that addresses the mental health market". Just to give you some examples.
If you find something that positively pulls you towards working on it, take that opportunity. Leaving because worrying about career growth is better than other materialistic reasons but it's still a negative drive. You change jobs and you will still think about "am I not growing fast enough" or "am I not promoted as quickly as my peers". That's not great.