When I'm having trouble with a passage of music, or when I'm edgy about performing something in public, I have a simple trick.
I do it slightly slower.
I give myself a little extra time.
Not so slow, that it sounds like I can't handle the music. Or that I don't have a good sense of rhythm.
But that extra nanosecond of time to get the right hand placement, to look where I'm going, whatever it is that I need to do.
It's such a small amount of time, people don't notice.
In fact, it's such a small amount of time, I might not playing slower at all. I might just be conceptualizing it slower.
Try it.
In music and life, you'll usually find that you have more time than you think.