I think it bears repetition: in a game that relies upon hidden information, which is the case for many D&D modules (as well as many other games, like many card games, Mastermind, etc), then if a player has acquired the information in some way other than through their gameplay the game will be compromised (at best) or ruined (at worst).
If a play gets the hidden information through underhanded means, that's what we call cheating. And the problem with cheating isn't that it's metagaming - the problem with cheating is that it's cheating!
There can also be accidental behaviour that has the same consequences as cheating - eg I'm playing cards, and I don't deliberately look at your cards but I catch a glimpse of them when you turn your head to answer a question and inadvertently turn your body, and hence your hand that is holding the cards, at the same time. If I see one card and its the 8 of clubs and the bid is diamonds, it probably doesn't matter and we can play on. If the card I see is the jack of diamonds, and the fact that you had that card hadn't already been made clear by the bidding, then maybe it's time for a redeal.
In RPGing which doesn't rely on hidden information, then the player knowing what sorts of ideas the GM has in mind and using that to shape their play will be metagaming, but seems as likely to help as to hinder play. I'm thinking here of Burning Wheel, maybe some PbtA play, In A Wicked Age, maybe some HeroWars/Quest, Wuthering Heights, etc.
If a play gets the hidden information through underhanded means, that's what we call cheating. And the problem with cheating isn't that it's metagaming - the problem with cheating is that it's cheating!
There can also be accidental behaviour that has the same consequences as cheating - eg I'm playing cards, and I don't deliberately look at your cards but I catch a glimpse of them when you turn your head to answer a question and inadvertently turn your body, and hence your hand that is holding the cards, at the same time. If I see one card and its the 8 of clubs and the bid is diamonds, it probably doesn't matter and we can play on. If the card I see is the jack of diamonds, and the fact that you had that card hadn't already been made clear by the bidding, then maybe it's time for a redeal.
In RPGing which doesn't rely on hidden information, then the player knowing what sorts of ideas the GM has in mind and using that to shape their play will be metagaming, but seems as likely to help as to hinder play. I'm thinking here of Burning Wheel, maybe some PbtA play, In A Wicked Age, maybe some HeroWars/Quest, Wuthering Heights, etc.