The first thing you need to do is sort out your priorities. These are for you and you alone no matter what social expectations are.
What's more important to you? Money? Autonomy? Fame? Health? Time off? Family?
The goal here is to know what's the most important to you vs what's the least. When considering changes in your work realistically speaking how does your current role rank up with supporting those priorities, how does the new job rank up? If one job is going to benefit what's important to you more than another you know which job makes more sense.
No job is truly safe. I've been through 7 layoffs of which I survived 6. I can tell you only half of those were people aware the layoff was coming. Most of the time those who were laid off had no warning, just came to work, and unemployed by lunch. Not saying this will happen, just saying even the safest job is only so safe.
On the other hand the jobs can have an unreasonable amount of risk where you're not counting on if you'll be laid off, rather you're counting on when.
That said you need to decide how much risk you're willing to take and base what jobs you're willing to consider off that. (if you have family, they need to be factored in here)
One thing people have to be careful about is your finances with a job switch. You want to have enough set aside where if things just don't pan out you can survive unemployed for a least a good couple of months. (of coarse you should try to have this set aside incase of any unforeseen situation such as illness, layoff, injury, burglary, etc.)
If you have no safety net changing jobs can be exponentially more risky to your financial well being.
Grass is greener
You have to think objectively about what your job offers vs the new opportunity. It's very easy to get in a grass is greener where you see everything wrong with your current job without knowing what's wrong at the new place. I typically only consider the good of my job now, vs the good at the job to be to try and stem the worst of this in my personal choices.
Never second guess
When you actually make the jump don't second guess it. Give a good chance if it doesn't work fine, if it does great! What you shouldn't do is back out last minute or go back and forth on whether or not you're going to do it. Typically if you find yourself going "I don't know", "I'm not sure", "I probably shouldn't" than likely you shouldn't. Exception: I would say if you're back and forth more so because change itself and not what you're changing than you just need take a deep breath relax. Change is just a thing, neither good nor bad. It's the WHAT in change that determines where it stands.