Probably the biggest reason for this is because of what you focus on during the performance!
When you play your best, your focus is always OUTWARD, on the action as it unfolds in front of you, moment by moment…
When you struggle or choke, your focus is always INWARD on your thinking, (a mistake, what you should’ve done, what others will think, the negative consequences, etc.)
To consistently play your best when it counts the most, you have to learn to immediately switch your focus away from THINKING (inward) and back to what you are DOING (outward) in the moment. Every time thoughts pop up and try to distract you with an inner focus, simply notice them and then quickly get your concentration back outside in the action as it unfolds!