Being unprepared for the test because you didn’t study is an easy fix.
Feeling unprepared after preparing is performance anxiety.
Usually, it’s because there are no redos.
Climbing has a term for this, “the onsight.” It’s your first go, with no beta, and you have to climb it without falling, which isn’t bad if the climbing is below your grade. But as you progress to climb at your hardest, the onsight gets very difficult.
The point is, preparing for an onsight is a different skill versus getting to try again and again. And we don’t often practice to perform the first go, which in the end is a different skill set.
Life resembles way more like an onsight.