Hand to heart, the honest answer to this question is “as long as it needs to be.”
I know that isn’t the answer that you wanted. But it’s the truth. If you’ve been given a page length or word count, that’s because, in your teacher’s experience, that’s how much space it takes to make a decent response to the writing prompt they’re giving you. It’s never a magic number, let alone a guaranteed grade.
Let’s stop for a minute and talk about what your teacher hears when students ask that perennial question: “how long does it have to be.”