The Yerkes-Dodson law, as most often characterized, dictates that the relationship of arousal to performance resembles a bell curve. Performance improves as arousal increases, but there is a tipping point at which increased arousal actually degrades performance. In the original paper, mice producing incorrect responses in a two-choice discrimination task were given electric shocks that varied in strength. The speed of habit formation was affected by the strength of shocks such that stronger shocks resulted in faster acquisition, but only to a point. When shocks were rather more intense, acquisition was impaired.
Yerkes R.M., Dodson J.D. (1908). The relation of strength of stimulus to rapidity of habit-formation. Journal of Comparative Neurology and Psychology, 18: 459–482.
Teigen, K.H. (1994). Yerkes-Dodson: A law for all seasons. Theory & Psychology, 4(4). https://doi.org/10.1177/095935439044004