Let's take a step back, what is the definition of opportunity cost?
Opportunity cost is the value of the next best thing you give up when you make a choice.
Here are three examples:
You are hungry and you order a pizza for 10 (enter your currency of choice), what else could you have bought to eat for this amount of money (a burger, sushi, fries, etc.) or you could have saved the money.
If you spend an hour gaming on your favourite gaming console, the opportunity cost is what else you could have done with that hour (like reading, cooking, cleaning or exercising).
If you a buy a stock the opportunity cost is what other stock you could have bought with that money and the return it would yield in the future.