There is a basic supply demand chain.
An extraction economy digs up minerals.
You can sell minerals to a refinery economy who turn them into metals
Metals are bought by industrial economies who turn them into products
Products are bought by most economies (mining equip to refineries, agri equip to agri, computer clobber to high tech)
That is the framework. There is ALOT more to it.
Some economies are mixed. The population of a system dictates its supply/demand turnover.