Research on stress shows that a little bit of stress (called arousal in psychology terms) can help you perform a task, because it heightens awareness. Too much stress, however, degrades performance. Two psychologists, Robert Yerkes and John Dodson first postulated this arousal/performance relationship, and hence it has been called the “Yerkes-Dodson law” for over a century.

https://www.blog.theteamw.com/2010/05/23/100-things-you-should-know-about-people-34-too-much-stress-results-in-poor-performance/