Distinguish between sunk costs and opportunity costs.
These are very different kinds of costs.
Sunk costs are the costs that you have already incurred. This is the money that you have put into some particular endeavor and which you can not recoup. For example, if you buy machinery to produce a certain product, the price of that machinery is sunk. You have already paid for it and cannot get that money back. The concept of sunk costs is important because people should not (economists say) let sunk costs influence them. You must not look back at the money you spent on that machinery and say "I have to keep going with this project because I've already spent this money." Instead, you must only look forward at whether you can make money in the future with that project.
By contrast, opportunity cost is something that people must take into account. An opportunity cost, according to this link, is the
value of a forgone activity or alternative when another item or activity is chosen.
Let's say you own a piece of land and you can build a house or an office building there. If you choose to build the house, the opportunity cost is the money you could have made by renting the office building to others.
Opportunity costs must be considered when making decisions. You have to consider whether (in this case) the value of the house you build is truly greater than the money you could have made if you built the office building.