Well, how many buildings, and of what sort, varies enormously, but yes it won't be a whole town or region.
Most of my street is a single post code. Once upon a time it was a street of single family dwellings, so that's maybe a 3-4 dozen homes, but this is a city suburb so densification means some of those homes were modified and cut up to form flats, one large family home becomes six smaller homes - and some were purchased, knocked down and replaced by buildings which don't look out of place but aren't what they were before. I live in a purpose built four storey block, but it's designed to look superficially like a big house, the bottom floor is below street level (it faces out over the hill), the top has only loft-style windows at the front like somebody did a loft conversion.
It's all still one postcode though, so I share a code with maybe 100+ households. Recoding is disruptive and it's not really worth it, so they mostly don't do it.
Remember for actually delivering the post the postcode is just a convenient human readable part of an address, the machines (with occasional human help) turn any arbitrary address into a unique destination code, and then that's literally barcoded (albeit not in a code you're used to from like UPC etc.) onto the post. So for the Royal Mail the postcodes not being as descriptive as they were fifty years ago isn't a big problem.
Take some mail you've received, preferably over several days and study the outsides carefully. Two fluorescent orange bar codes have been jet printed onto the mail during sorting. The upper code is "just" a temporary unique ID, every piece of mail in the sorting system is issued a code, when they run out they start over, this helps with debugging and statistics. The lower case is in some sense the successor to the postcode, it'll be identical for every item delivered to the same address and distinct for other addresses. In fact it's encoding the "Delivery Point" which is what PAF handles, the location to which the Royal Mail employee delivers mail. https://en.wikipedia.org/wiki/RM4SCC
The use of these "real" postcodes also enables the Royal Mail to more readily accede to impractical "vanity" postcode requests. If the rich people in this part of Dirt Town think they ought to have postcodes from the adjacent and posh sounding Upper Niceton, RM can allow that, because in reality their teams are working from the purely numeric code which will still treat all these new "Upper Niceton" homes as being where they actually are, in Dirt Town.