You have to gain control of your mind. You have to have confidence. You have to have more knowledge about yourself than something else does. When you know everything about something, you don’t fear it because you are in control.
I remember hearing something that said if in your dream you’re getting chased by a T-rex and you’re so scared it will eat you, just stop and let it eat you. If the T-rex eats you in your dream, then who cares because it’s just a dream (and the dream ends). You conquered the fear because you understood that an imaginary T-rex is nothing to be afraid of because it can’t actually do anything. By being scared of a T-rex eating me in my dream, I’m letting something else be in control of me. When I’m in control, I have enough knowledge to know that nothing can/will/could ever happen.
Deep stuff lol but it all boils down to this: if you know everything that can logically happen, you’ll never be surprised by anything (i consider fear a form of surprise in this case).