Both a paragraph and an essay must state and develop a main idea. Each must include a statement of the main idea. For an essay, this is a thesis statement, and for a paragraph, this is a topic sentence. Once the main idea is stated, what follow develops that idea. Development for both might include examples and details, statistics, the opinions of experts, or some knowledge or understanding from the writer. In a literary analysis, the main idea is generally supported by the literature that the writer is analyzing. Supporting one's main idea can be accomplished in a paragraph or an essay. There are some differences, of course, which are worth mentioning.
A complex idea cannot usually be supported in one paragraph. For a complex idea, there is a need for more than one supporting point. For example, if I were writing about the literature of the Roaring Twenties, I would be likely to be stating some idea about that literature that would require developing examples from several different literary works. This would be too much to put into one paragraph.
Another difference is in the thesis statement or topic sentence. Generally, a thesis statement gives the reader a preview of the points that will be developed, a kind of "This is true because of X, Y, and Z" kind of statement. On the other hand, a topic sentence generally tells the reader what the paragraph is about, without giving the reader the series of points to be covered.
In an essay, there is generally an introductory paragraph, followed by separate body paragraphs, one to develop each point, and a conclusion. This occurs on a smaller, simpler scale in the paragraph, with an introductory sentence, sentences that develop one point, and a concluding sentence to wrap it all up. So, in this way the paragraph and essay are similar and different.
If you are not assigned specifically to write a paragraph or assigned specifically to write an essay, you need to decide how complicated your main idea is and how many points you will need to support it. And, if each point you want to make is a point that needs to be explained in more than one sentence, you will need to be writing an essay.