If you did your best to write a complete, clear, and insightful essay within the time allotted, you should have nothing to worry about.
There are many types of essays you might write as a student. The content and length of an essay depends on your level, subject of study, and course requirements. However, most essays at university level are argumentative: they aim to persuade the reader of a particular position or perspective on a topic.
For this reason, it can be helpful to simulate the conditions of a timed exam before the actual day: pick a practice question, find some lined paper, set a stopwatch, and see how you do!
Become familiar with the course content. If the professor hasn`t told you in advance what a timed essay prompt will be, it can be intimidating to think that you will have to write about a subject you`ve never seen before.
Do your research: Read primary and secondary sources and take notes to help you work out your position and angle on the topic. You`ll use these as evidence for your points.
Understand your assignment: What is the goal of this essay? What is the length and deadline of the assignment? Is there anything you need to clarify with your teacher or professor?