The point of a monster encounter is twofold. Mechanically as resource depletion and meta-narratively as emergent world building.
Every 3 turns there is a 1 in 6 chance of the characters within a dungeon meeting a wandering monster who roams the ruined halls of a dungeon. This possibility is the central framework within which the time vs resource betting of the players occurs. Successful dungeon-crawling is based on players successfully gambling that they have more resources then the problem they encounter will drain them of. Encountering an ogre and betting that they have the HP or spells enough to overcome it. Encountering a locked door and betting that they have enough skill chance to pick it without failing and needing to spend extra turns which would spawn monsters. Encountering a dark corridor and betting that they have enough torch time to complete the excursion.
The main resources managed by players are: Hit-Points, Spells, Expendable Items, and Time. Hit-Points are a measure of continued ability to both exist within the game and to survive damage from a monster combat. Spells are a measure of wide-scope obstacle side-stepping or one of the other three resources. Expendable Items are a measure of narrow-scope obstacle side-stepping. Time is especially important for its dualistic nature: it emerges as a sum of total torch light and each diminishment causes a potential wandering monster encounter which will take away all four types of resources. The OSR game is players betting that they have enough Hit-Points, Spells, Expendable Items, and Time to excavate the treasure found within an emerge. This treasure is then converted to XP and in turn grants them more of the initial 4 resources with which to bet on further excavations of treasure until they gamble unsuccessfully and lose all four of the resources.
Every monster encounter is also a gamble. There is a 1/6th chance of it even occurring. A 36% chance of a negative reaction roll and a 1/6th chance of monsters getting a surprise round in combat and causing resource drain which cannot be countered well. Each time a wandering monster encounter occurs it is a successful gambling attempt by the dungeon that more of its denizens will spawn to reduce the resources of the characters enough that they will either depart or be deceased. The design of the array of monsters to be encountered, in terms of just mechanics, is then a measure of the lethality or antagonism of the dungeon. While planned encounters have a understood lethality associated with them, wandering encounters are an unknown quantity.
Just as in firearms safety where on does not point a weapon at someone that they do not intend to shoot and kill, one does not design dungeons that they do not intend to slay. In terms of dungeon design no obstacle is to be intended to be overcome by the characters. Not only does this account for player ineptitude but for player agency. If the player could walk into a falling axe with no fear of death then why have it in the first place.
There is an old saying in RPG DMing advice that until I started OSR I did not properly understand. "Only have meaningful combat encounters" originally I thought this statement to mean don't have wandering monster encounters for their own sake and have each monster combat to lead into the narrative. I now understand that each monster encounter must have threat of character death and can tie into the narrative by emergent elements. Now that we have established the type of relationship between the players to the monsters, we can look at the different parts of a monster.
Each monster has the following. HD, an attack value, an armor value, a movement method and value, damage dealt by an attack, saves, and a morale score. Monsters further may be encountered in groups and possess special abilities. A monster's HD is shorthand for how many hp it has and in several systems will also code for it's attack value and saves acting as a fighter of equivalent level. Assigning a monster more or less HD results in two important differences. First, it allows the monster to last longer in combat and second, it make the monster be treated differently by spells. Most spells target HD of creatures so a creature with more HD may be able to escape certain spells by simply possessing more HD than a spell is capable of affecting. A monster's attack value reflects how easily it may deal damage to characters but disproportionately effects characters of low armor. A monster with an attack value of 1 is likely not be able to hit a character in plate but may hit a character in leather. A monster with an attack value of 5 may hit a character in plate but will almost always hit a character in leather. Similarly monster's have defense values which reflect how easily a character may deal damage to them. A monster's movement score is fundamentally a measure of how difficult it would be for a party to escape from the monster if they decide to flee. The damage dealt by a monster functions closely to their HD or def value. Rather than lasting longer than a player they simply increase the speed of player death. Saves vary by system and as such are difficult to write about. Morale is a unique measure as it is checked for whole groups of monsters and may side-step a fight outright. The higher the morale the more likely the monster will fight to it's last hp.
By varying these values you can create combats which each move at different tempos. Let's look at three OSR monsters to see how they cause different tempos: A knight in armor, a coward barbarian, and an undead. The knight in armor has medium HD and high Defense, few attacks will deal damage so characters will be forced to make the attacks that do count. The coward barbarian has high damage but low morale, the fight will revolve in either striking before he does or surviving long enough to scare him off. The undead has a high morale score but low movement which necessitates that it will fight even it has a single point of hp and even if run from will slowly chase the characters.
Differing monster amounts results in a different action economy and are ultimately important in how many characters are in a party. A party of seven level 1 characters is likely to take down a HD 4 enemy just because they get 7 attacks to the enemies 1 attack. Similarly 15 HD 1 enemies may take down 3 Level 3 character because they have a 5:1 action economy bonus. Wise players will use choke points for this very reason. By increasing the number of enemies you not only increase the functional HD of the encounter you also grant the enemies more actions. I treat 3 HD 1 enemies equivalent to a HD 3 enemy for this purpose, this math eventually breaks down linearly but the relationship is still important to consider.
Special abilities of monsters are so varied that it's difficult to consider them singularly like the action economy of multiple actors. These are often the most exciting aspects of a monster and so I would simply add them when I'm adding the thematic and world-building elements of the monsters.
Taking the considerations of those 9 monster elements you can create different and variable monster to fill your personal dungeons.
I make my wandering monster tables with an uneven distributions. For an example see the wandering monster table for a small abandoned ruin:
5-7: Mummified Cultists
8-9: Animate Stone Statue
10: Mummified High Priest (has magic)
The majority (40%) of the encounters will be with relatively weak enemies. The next segment (30%) will be with a simple but more difficult enemy. The next segment after that one (20%) will be with a difficult enemy. The last segment which is rare to find will be with a complex and dangerous enemy. The variation of enemies encountered will cause the combats to be varied but the majority will be against regular bandits.
Following our example table, we can look at the possible mechanical differences in the entities and figure out how they would cause different interactions with the players. The bandits are likely to have ranged weapons but low morale resulting in skirmishes rather than protracted combats. The mummified cultists will have low defense but high morale, as such they are likely to swarm and have swaths of them be cut down. The animate stone statues have high defense but low speed so likely than fighting them characters may simply run away form them and lock a door. The last entry will be unique in that the special abilities of the mummified high priest will cause novel effects that the characters must overcome.
Now that we have covered the mechanical aspects of encounter tables we can look at the meta-narrative elements. From the encounter table it is likely that you the reader have constructed a view of a dungeon. The encounter table is a way to telegraph the dungeon itself and should inspire a view of a dungeon by simply reading it as the bandit base on top of a ancient temple does here.
Similarly the encounter table builds the world through emergent elements. The bandits are likely to have on their bodies other treasures from the temple which inform about it. They may even have a map! The mummified cultists inform that not all of the corpses in the dungeon are dead and may arise again. The stone statues by their design may also inform about the nature of the temple. Statues of demons and statues of heroes creating vastly different themes. The last entry is likely to have unique loot on their person or even secret rooms that are filled by their possessions. The mummified priest served a religion and his artifacts will inform of it. All of these elements readily emerge and that's not even counting a positive reaction from a wandering monster.
In conclusion, the mechanics of monsters dictate how the players face them and their aesthetics dictate that the players learn of the world. The encounter table should telegraph the dungeon and inspire it just by reading it. What roams the halls of a dungeon is what the players will directly deal with.