Sometimes, and often, when you say no to something, what it really means is saying yes to something else, even if that something else hasn’t been defined yet. It is about leaving things open for the possibility of good rather than filling it with mediocre.
The hard thing though is identifying the good. There isn’t really a foolproof “process” for doing that other than being self-aware enough to know when things feel right and going with that instead of listening to the voice of reason that might push you towards things that seem like good opportunities.
So do the research. Check and cross-check. And then, once all is said and done, go with what feels right. It’s the only thing that’s ever worked for me. Everything that looks good but feels bad ends up looking bad at some point too.