Opportunity cost is the lost benefit of not buying one card in favor of another. For example, the problem with the "Village idiot" strategy is not that buying Village harms your deck; it's that the Idiot continues buying Villages when he could be buying Silvers (or terminals), which would provide a more useful benefit relative to the state of his deck. So when he does not have enough buying power for better cards, he can blame himself for not considering the opportunity cost of buying Villages over Silvers. In another example related to buying power, a Hoard buy could have been a Gold buy instead, so if you get a hand of Hoard-Silver-Copper-Copper-Copper as the game is nearing its end, you may rue the opportunity cost of buying that Hoard instead of a Gold, since is needed for a Province. This is not to say that Hoard is a "bad" card, just to bear in mind which phase of the game you're in, and which cards will most likely help you win.
Some cards, while often having moderately useful effects once in your deck, are nonetheless considered weak compared to other cards of their cost, and it is usually more prudent to buy the "better" card, as buying the "weak" card would thus come at an opportunity cost of missing out on the "better" one. Examples of such cards are Counting House, Scout and Chancellor.
Potion is worth the opportunity cost - whether skipping over more immediately useful cards is worth having access to the often quite powerful -cost cards. Factors in this decision are the specific -cost cards available, and how many are in the kingdom.-cost cards require the player to evaluate whether buying a
A similar concept is whether or not buying a card is better than not buying anything. In certain instances, spending a poor cantrip can actually be detrimental to a deck, such as when performing terminal draw big money (you want to draw Treasures, not dead cantrips), or when faced with a handsize attack (cheap cantrips make the decision of what to discard more difficult).turn on a cheap