if you're within reach of both, then it's not a choice, and there's no opportunity cost in picking just one - you'd be taking both.
If not within reach of both but just one, and you picking one up means someone else might pick up the other, then which would you choose? The other is then by definition, the opportunity cost.
cash cannot buy more fabs. ASML machines are the constraint, plus TSMC's capacity is a constraint.
Not to mention that nvidia's cash pile isn't magic - they should not overpay for capacity; they're better off returning cash to investors in that case.
if you're within reach of both, then it's not a choice, and there's no opportunity cost in picking just one - you'd be taking both.
If not within reach of both but just one, and you picking one up means someone else might pick up the other, then which would you choose? The other is then by definition, the opportunity cost.