I find that my first drafts of novels sometimes turn out to be around 50,000 words. That's too short for almost everything, so more has to be layered in. Other writers turn out first drafts over 100K, up to 120K, which is probably a little long for most genres.
Mystery, which is what I know the most about, is pretty specific on lengths. Cozies and traditionals are shorter, with thrillers allowed more words. Some publishers want mysteries to be at least 60K, others 65K. Tops for that category is probably 75 or 80K. A thriller of 80K or 90K is probably about right, but can go longer for some publishers.
Then there's short fiction. Novellas fall in between novels and short stories. My first drafts would probably qualify if they were any good. But for true short stories, length is subjective.
The Derringers, a short story contest award, has in the past specified a long short story as 8001-17,500; mid-length as 4001-8000; short story as 1001-4000; and flash as up to 1000. They do sometimes change these categories and other contests have other length requirements.
Flash fiction may be the most variable of all. There are online sites that take 55 words or less for publication, 100 or less, 666 or less, 700 or less, and 1000 or less. At least one calls 500 words flash fiction and another 1000. There are sites that want six-sentence stories, and I've seen contests for six word stories. That's short!
So what can the writer aim for? In most cases, I say it's best to let the story take its course, then find the market. But it *is* fun to write for the shorter markets. There's no better way to hone your prose, make it lean and clean, eliminate every single last unnecessary word.
(photo by Lite, used under GNU Free Documentation License)