You've probably experienced an encounter where a player asks, "Do I know anything about this monster?" Knowing what specie or type of creature you face – its hit points, traits, abilities, and attack options – is valuable in combat. But 5e rules don't provide a straightforward answer to this question.
1. BASIC APPROACH
Requiring a lore-based Intelligence check (see Player's Handbook p. 177) is one way to do this. Chris Perkins suggests this.
Tasha's Cauldron of Everything (p. 148) provides a "Monster Research" table that provides for each monster type (see Monster Manual p. 6) a suggested skill or skills that reflects possible knowledge of the monster type. Although the table is presented to help characters determine what a monster may desire for purposes of parleying, it could easily be used for lore checks to determine whether you know something about the encountered monster that will help you fight it.
The skills in the table include the four Intelligence lore-based skills of Arcana, History, Nature, and Religion, and the Wisdom-based skills of Animal Handling and Survival. The table provides the following:
Aberration: Arcana
Beast: Animal Handling, Nature, Survival
Celestial: Arcana, Religion
Construct: Arcana
Dragon: Arcana, History, Nature
Elemental: Arcana, Nature
Fey: Arcana, Nature
Fiend: Arcana, Religion
Giant: History
Humanoid: History
Monstrosity: Nature, Survival
Ooze: Arcana, Survival
Plant: Nature, Survival
Undead: Arcana, Religion
The repurposed table works like this: You encounter a monster of the aberration type. The DM asks you to roll an Intelligence check to see if you know anything about the monster. You are proficient in the Arcana skill. Since Arcana is a listed skill in the aberration entry, you add not only your Intelligence modifier to the roll but also your proficiency bonus. The Difficulty Class, according to TCoE, is 10 + the creature's challenge rating. A DM could of course provide a different DC.
A successful check means the character knows something about the encountered creature that will be useful in combat. TCoE does not provide any guidance on what such combat-oriented knowledge could be, thus the DM will have to determine this.
It is possible that a skill not listed with the monster type may nevertheless be relevant to identifying the creature in question. For example:
Religion may help in identifying creatures with prominent religious or cultic practices (e.g., kuo-toa).
History may help in identifying creatures associated with an ancient or lost kingdom.
Arcana may help in identifying creatures with prominent magical abilities.
2. BEYOND THE BASIC APPROACH
If you like more realism, so to speak, and appreciate context, consider modifying the basic approach as follows.
When asked if a character knows anything about an encountered creature, the DM should determine if there is an in-world justification, in the words of Rodney Thomas, for the character to know anything about the creature encountered.
If the answer is "no," then no ability check is allowed. A lucky roll will not help you because the DM has determined that in the situation it is simply impossible for you to know anything about the encountered creature.
Rodney Thomson says that he would be "more inclined to allow a check if there is an in-world justification beyond 'I have a high Int.'" Mike Mearls states: "I don't allow checks for weird creatures that a PC couldn't have possibly heard about." Sometimes a die roll shouldn't be able to change fundamental limitations of a character.
If the answer is "yes," then the GM has a number of choices to make. In certain circumstances the GM could simply conclude that you have knowledge about the encountered creature. In other words, no check would be necessary.
For example, I would rule that a high-level cleric or high-level fighter will simply know that a skeleton has damage vulnerability to bludgeoning damage. This approach is essentially a version of the "Background Proficiency" variant rule in the Dungeon Master's Guide (p. 264).
In other situations, the GM may conclude that you have a chance to know something combat-useful about the encountered creature. How do you determine if there is an in-world justification for a character to make a creature identification check?
Here are some factors to consider:
Background. Given the character's background (PHB p. 121), is it likely that the character when young heard stories from elders about this specie of creature?
Race. Does this specie of creature figure prominently in the lore of the character's race? An elven adventurer likely knows something about the drow.
Language. Does the creature have a unique native language and does the character know it? If yes, the character likely knows something about this specie of creature.
Character Level. All else equal, the higher the level of the character, the more likely the character knows something about the creature specie in question.
Character Class. Does the character's class suggest likely familiarity with this specie of creature? Possible affiliations include:
Barbarian: creatures found in the wilds (tundra, jungle, forest, mountains, plains, desert, etc.) of the barbarian's homeland.
Cleric: celestials, fiends, and undead.
Druid: beasts, fey, elementals, plants, and oozes.
Paladin: fiends, undead, and, if the Oath of the Ancients (PHB p. 86) is taken, fey.
Ranger: beasts, monstrosities, giants, dragons, and favored enemies.
Sorcerer: creatures of the same monster type as that of the sorcerer's source of power.
Practitioners of necromancy: undead.
Warlock: creatures of the same monster type as that of the warlock's patron.
Wizard: aberrations, celestials, constructs, dragons, fey, fiends, elementals, monstrosities, undead, creatures of other planes.
In certain circumstances, the factors in the table could lead a GM not only to allow an ability check but also to grant advantage on the check.
3. IS AN ACTION NECESSARY?
Another issue is whether you get to identify an encountered monster for free or need to expend an action. I think you would not have to use your action in order to identify a creature.
You're not attempting to actually do something here, but rather, are simply asking the GM about your current state of knowledge. You either know something about the creature or you don't.
Note that we are not talking about engaging in the act of investigation. If you didn't already know something about the creature but wanted to logically discern from your observations likely abilities and features of the creature, then this would take some time and require your use of an action to make an Intelligence (Investigation) check. Matthew Mercer has taken this approach.
4. CONCLUSION
The context-rich approach in handling the identification of creatures is more fair and interesting. Success is steered away from an over-focus on Intelligence. Book knowledge is not everything. A seasoned high-level fighter with a low Intelligence score will know more about the potential threats lurking in the world than the most brilliant, low-level wizard.