Word counts became necessary so publishers could plan how to print their books ahead of time; so their print runs could be set up for a certain number of pages and that meant a certain number of words to fill up those pages.
Now that online books are popular, word counts aren’t as important and they vary greatly but readers have gotten used to a certain number of words being in a particular kind of book.
For instance, a novelette is less than 20,000 words. A novella is 20,000 to 30,000 words, maybe up to 40,000. A short novel is 40,000 to maybe 60,000 and longer novels go up accordingly.
If you read a lot of novels, you might notice whole scenes that don’t seem to serve any purpose. The purpose is often to add enough words to make the count required by the publisher.
I sincerely hope word counts soon cease to become required and stories become all that’s important.