It might not look like it now, but that is something I have dealt a lot with in the past. (and still sometimes now, but I know my process pretty well now.)
I’ll start with the very beginning: Looking at what I want to do, visualizing, running some of the worst case scenarios through my head. With riding down a curb, I admit there isn’t a massive amount of things you’ll get from this, but I have sometimes found issues that I managed to avoid from this. (Tree branches that would have hit my head on a jump, or maybe moving a rock to the side because it would be right in my landing area.)
Then: Making the decision to do it. Sometimes I look at something and say “that will work” - get on my uni and do it. Sometimes that means riding up to it multiple times, doing something similar but easier to get the confidence up (like riding down a lowered curb). Sometimes I’ll decide to walk away from it, if you don’t feel right it’s no shame to let it be. I’ve done jumps on my muni that I looked at for half a year or more until I decided I’m now confident enough that I can do it.
Finally: get all thoughts and fears out of your head and do it. The hardest step. It doesn’t feel like it, but this is a skill you can learn. Some people are just naturally good at it, but even if you are of the more fearfull type, you can get better at this.
I used to not manage to get all my fears out, despite “knowing” that I pretty much 100% safe. Now once I’ve made the decision, I can almost always get my head clear.
A random thing that has sometimes helped me is music. Concentrating on the music sometimes helps me to get all other thoughts out of my head, and into that “flowstate”.
Wearing the proper protective gear obviously helps, and is important. But I tend to think that is only half the job of doing things safely, because there are a lot of injuries where pads will not help you. You should wear a faceshield and gloves while using a chainsaw, but if you are wearing them, that doesn’t mean you can safely cut the branch you are sitting on.