Opportunity cost is the next best alternative choice that someone has. In an economy, it can be confronted by several actors; the government itself, consumers, or firms.
On an individual level (consumer), it can be faced when the individual decides how to allocate their budget; which may involve their labour wage, subsidies and grants. For example they may have to decide whether choosing to invest their money in a savings account or higher education.
On a governmental level, the state may have to decide whether to allocate resources in the form of subsidies towards capital goods, or consumer goods. Capital goods are goods that are used to produce other goods, usually found in factories, such as machinery, computers, robots etc. Consumer goods are goods that are provided to the consumer for everyday consumption.
On a firm level, the business may have to decide whether to invest their profit in a savings account or purchase new assets (i.e. new buildings).
Different actors in the economy would face different opportunity costs, and thus different actions to take decisions would be necessary. The concept of opportunity cost could be plotted on the production possibility diagram; which shows all the maximum combinations of production in an economy.