The first option includes the time and money it would cost you to go get the coffee, as well as the increase in productivity you get from it.
How opportunity cost works
Let’s call it twenty minutes and five dollars. But maybe you could have cleared out your email inbox in that time or finished that project brief you’re behind on. That’s your opportunity cost for going to get the coffee.
Opportunity cost for your website goals
Learn as much as you can about the life forms in your viewfinder
In the second option, where you don’t go get the coffee, your opportunity cost is less productivity. Maybe you saved time and money, but you weren’t able to get through your whole inbox in that time or completely finish the project brief.