Many beginning writers confuse background information they create about a character with backstory in the narrative. This is an area in creating story where discernment and tight story play a key role.
Background is the detailed character history that you build for all the main characters in your story—where they were born, their parents, how they grew up, likes and dislikes, life-changing
early trauma incidents, phobias if any, etc. The more you know about your characters the better able you will be to make them believable and intriguing in your story. So, the more time, work and detail you put into your background the richer, more complicated and more conflicted your story will be.
Backstory consists of events that happened earlier than the story itself but are inserted into the plot. Backstory must be used with a deft hand. Beginners usually add too much, too soon. I recommend that beginning writers avoid backstory at all cost, especially in screenwriting. If you insist on putting backstory in wait until you have written at least one third of the story. Beginning with backstory—because you want your readers and viewers to know all about your character—will always feel like a trick to the audience.
Yes, it is essential to build a background for your main characters. Think of it as the iceberg. Only the tip of the iceberg actually appears in your story. Use the basic guideline: it must move the story forward or throw it out.