As you say, it depends heavily. You are absolutely right that cash is the correct unit to be thinking in, not resources.
The real trick is developing some judgment about what the future cash value of all those resources are.
If you’re trying to get an upgrade, it might seem more sensible to make a little cash and but the resources based on current prices. But when you’re buying hundreds of a resource - and other players are also buying that resource for their upgrades! - the prices will frequently tip into making it way better to produce your own upgrade resources. Of course, it depends - but this is why it’s quite rare to not manufacturer your own building materials early on, and often for most of the game. There is just so much upcoming demand for that stuff, and starting prices don’t reflect it.
This is especially true when you can take on some debt for even earlier access to those resources (steel mills burn power, for instance). Debt is very powerful, as long as you can convert it to cash (or victory!) faster than its interest rate!