Let’s see if I can waste a thousand words repeating what @MeltingPenguins said so beautifully in nine.
The scope of your story will determine how many words you need for it to satisfy your readers.
An epic adventure about “saving the world” is going to require an awful lot of words to convince readers the world is actually in danger, and a quite terrifying number of additional words to keep it satisfying as “the world” is extricated from that danger. The Harry Potter series needed seven books and well over a million words between them, all to make readers believe a schoolboy could defeat an evil wizard. Just shy of 1,100,000 for the whole series, according to the counts I’ve found. The Lord of the Rings trilogy wasn’t much better, needing between 450,000 and 500,000 to make readers believe a short adult could throw a ring in a fire.
A much tighter, more intimate drama needs far fewer words, however. Twelve Angry Men, while not directly comparable because it’s a play rather than a novel or short story, only needed a touch over 11,000 words to tell readers about a jury reaching a “not guilty” verdict. Of Mice and Men took around 30,000 to tell readers about the fatal mistakes made by a pair of poor migrant farmhands.
How close a focus does your concept allow?
Twelve Angry Men is almost 100% character development. There’s virtually no plot or description. We never learn about the place those characters live in, the people they know, or how their lives progress. The plot is “they argue in a room, and some change their minds.” That’s it. Literally the whole thing. That’s why so much could be cut out, and why it can be satisfying despite being so very short. 11,000 words of pure character drama, give or take a handful.
Harry Potter has a vast and complex plot that simply doesn’t allow such drastic cutting. We need to have a grasp of how the setting’s characters use their magic. We need a grasp of their daily lives and their relationships. Defeating an evil wizard is a complex process, with many interdependent steps, and we need to see most of them. It’s time consuming, too, and we need to see time pass. But more than all the other things, we need to see the designated hero grow. We need to see Harry Potter (the character) grow in strength of arm, strength of spell, and ultimately strength of character. We’d never believe he could be the one to defeat the evil wizard otherwise! That’s why it’s nearly 100 times longer than Twelve Angry Men. It simply can’t be shorter by any significant amount.
So keep the scope tight.
Writing super-powered vigilantes? Who wear capes? Don’t bother with villains who want to destroy the whole city, or even the whole holiday parade. Find a villain who’s limited to destroying the judge’s box at said holiday parade. For a goal of 30,000 words, making an alternative to Christopher Nolan’s entire Batman film trilogy is an exercise in futility. But making an alternative to a single episode of Batman: the Animated Series? Oh yeah. That’ll do.
@rinari is 100% right about the process, though. Once you’ve gotten started, give the story what it needs. What it wants from you. Don’t worry about your word count until you’ve reached the end. Don’t even think about it until that point! Then you can go back and trim some fat (if your story’s long) or add some meat (if your story’s short).