Here's how you should format essay titles:
* In the text of the essay: Italicize the title.
* On a title page or bibliography: Italicize the title, or use quotation marks if it's a shorter work (like a poem or song).
Example:
* In the essay: "The Impact of Social Media on Modern Society" is a topic that has been widely debated.
* On a title page: *The Impact of Social Media on Modern Society*
Why not underline? Underlining was the traditional way to highlight titles before computers became common. Now, italics are the preferred method for highlighting titles in written work.