Sort of? For pertinent bits of lore that PCs might or might not know off the top of their heads (e.g. trolls and fire,) I include that info in my narration if a PC has a relevant proficiency. I mention the proficiency in the narration as well so that these knowledges aren’t invisible. Something like, “Thanks to your training in Nature, you’re familiar with trolls and know that they have regenerative abilities, though they can’t regenerate wounds that are cauterized with fire or acid.” For more obscure information (e.g. Intellect Devourers and Protection from Evil,) I don’t offer that information up front, but I will telegraph that there is information they’re missing, and I don’t prevent players from acting on out of game knowledge. So, with the Intellect Devourer example, I would point out that the hobgoblins are behaving very much unlike hobgoblins usually do. If a player asks directly, “would my character know about Intellect Devourers, and that they can be driven out with Protection from Good and Evil?” I would tell them that’s up to them - I have no problem with their character knowing that, but you’re also welcome to play your character as not knowing it if you want to.
That’s... basically it. If you want to learn something about a creature or a feature of the environment that your character doesn’t know off the top of their head, try some stuff. Interact. Experiment. I’ll resolve it like I do any action.