My understanding of early D&D play is that there was a general expectation that players could use any and all of their own skills to overcome challenges — including knowledge that their characters may not necessarily possess in the fiction. If you knew something about the scenario or the monsters, you could generally use it to your advantage and nobody would be like, "I'm sorry, Tim, but Tim the Thief doesn't know that you need fire to kill trolls."
Fast forward to the nineties or early aughties, though, and there's plenty of play advice (in game books, in periodicals, online, and passed along from player to player) based around the idea that any use of "out-of-character knowledge" is bad play, especially bad "roleplaying." (And this is still a widespread belief among tabletop players in the modern day, though it seems to be quite a bit less of a monolithic consensus.)
So, how did that happen? Who introduced terms like "metagaming" to the hobby? When did firewalling your own awareness and your character's first become a part of RPG play and RPG texts?