Worth noting - "uptown" can also mean or imply a part of town that is upstream and/or upwind of most of the municipality.
Centuries ago - when towns were full of domestic animals, and raw sewage just ran into the local waterways - living upstream & upwind were major perks of being well-to-do.
Plausibly the ur-example of this usage is London, England.
I think "downtown" can also have somewhat mixed meanings depending on context as well. Growing up in smallish suburb, people used the word "downtown" there to refer to the busiest part of Main Street where a lot of businesses were, but after moving to New York, I had to get used to the fact that "downtown" was used to refer to "lower Manhattan", and what I would have expected to call "downtown" based on how I was used to it being used is referred to as "midtown".
Part of this is that Manhattan has had a shift in focus between the two urban cores, from Lower Manhattan (where the original town was, and from which the city emanated, and still the financial and governmental core of the city) to midtown (which has become the cultural core of the city) over the last century or so. The language of geography takes some time to catch up.
wiktionary says it’s from “up” + “town”