Broadly speaking, I can think of two categories of player knowledge, here. For lack of better terms, I'll call them "general" and "specific".
General information is stuff like "fire is good against trolls" and "drow hate the light". While it was cool to discover these for the first time and I'd never want to take that discovery phase away from new players, after 30+ years, there's nothing fun about feigning ignorance about how to keep the stupid troll down. It's an artificial drag on the game that brings everyone down. Even the "it's a big, green, rubbery humanoid" schtick has worn thin -- it's a freaking troll already. I think it was WoD that broke the group of this: it's only fun to play the freshly bitten mortal just discovering their powers once, maybe twice if you've got a great GM.
That doesn't mean we don't ever have fun with mystery, though. Instead, I usually (when appropriate) use less detail. "It's a big, brutish humanoid. Probably not big enough to be a true giant, though. Roll your Nature skill or suggest an alternative check." (Yes, I let the players suggest alternate skills for knowledge in 5E.) If no one makes it, they can take some guesses, but it changes from surprise at having it get back up to suspense at wondering whether it's just an ogre or if they're going to have to pull out the flaming sphere to keep it down. After that, they just know. If having the mystery is really critical to the game, I've done things like having a werewolf who was weak to gold instead of silver or completely re-skin a monster so that the troll looks like a bullette.
Specific information would be something like if someone has read the published module the group is going through or is a buff about the setting and knows stuff. In this case, create a character appropriately. If your group is going through Curse of Strahd and you DMed the old I6 multiple times, back in the day, you may have as much misinformation as benefit. Make a character who is an outcast Vistani, escaped thrall, warlock seer, or somehow else privy to secrets. A good DM will play it up and keep the other PCs questioning your loyalty the whole time. Good times all around.
If you're a member of two different groups, and just finished running Princes of the Apocalypse for one group when the other decides they want to play it, well.... now's a great time to try a barbarian with a 6 intelligence or a rogue who is so focused on wealth that he never thinks about the long game. IME, the amount of information you can willfully forget if you make a concerted effort is astounding. Make sure you've communicated with your GM, though.
Some information walks the line between the two. I find that, between changes between editions and the rarity with which they're encountered, even the veterans I play with don't remember the details of, say, demon resistances. My general guide on this is to allow knowledge checks for some information and some logical deductions (do iron weapons work on demons or devils?). If you happen to remember something, that's cool, but no cracking open the Monster Manual during combat; if there's a reasonable chance you're going to encounter more soon, I'd prefer you to not run home after the game and read up, either.
Which gets to a call-out on the specific knowledge: If you're in the middle of playing a module, don't buy it until you're done. If you find it at clearance or something, then just don't open it yet. This is the one area where I start to have a real problem and would actually consider cheating. I have no room at my table for a player who would do this. If discovered, I'd boot them immediately and I'm not sure even an apology would get them back into any game I ran in the future. It's a complete violation of trust, not just between that player and the DM, but between that player and all the others. IMO, this is much worse than fudging dice or "miscalculating" hit points. It's about as bad as you can get without getting into non-game personal conflicts.