Emotion and cognition are not separate. They are interwoven. For example, humans often make decisions emotionally, then use cognition to justify their choices.
Your species is strange.
Emotional arousal is largely automatic. Plus, the thinking part of your brain does not have direct access to the automatically reacting parts of your brain. You can’t ask your subconscious what the hell is going on. Your executive function can infer your emotions from your body state, and then come up with an explanation for what it observes. Like any inference, it can be wrong, no matter how confident you are about it.
Wow, your species is really strange.
Emotion can disrupt learning, of course. For example, a clinically depressed person can become depressed suddenly, by seeing (or hearing or smelling) something that triggers an automatic reaction. The cue might not reach conscious awareness, but that doesn’t reduce its effect. Depression can stymie a human’s best intentions, including intention to learn.
Strong emotions can suppress your ability to think. For example, anger and fear change blood flow in your body, make some parts of your brain more active, and other parts less active. Your bodies are weird.
When you’re aware of these effects, you can mitigate them to some extent. You can interrupt yourself. This is the basis of some forms of anger management. Learn the signs of growing anger, watch for them, and interrupt the emotional cascade before it goes too far. “Interrupt” could mean leaving the situation.