The "law" of supply and demand is a theory used to explain the inherent instability of prices. It is just a theory, not a natural law. It may, in fact, not even be true. You were taught to believe it is true because it is an essential part of the justification for profit... which is the holy grail of capitalism.
The law predicts that prices will rise when demand exceeds supply and fall when the reverse is true. It does not however explain the real reasons why.
Do production costs go up when demand is rising? No, costs normally go down when items are produced in greater quantities. So why then do prices rise, and where does the extra revenue really go?
Price is always calculated as cost + profit. Input costs do have an objective value, but profits are entirely a subjective value. When demand is higher than supply, and prices are rising, most of the additional revenue becomes profit. Theoretically, competition constrains profits to a reasonable level, but price collusion negates this method of price stabilization much of the time. And of course, all input costs carry an imbedded profit component with them too, so the cumulative effect of profit along the price chain is enormous.
The Law of Supply and Demand is simply a convenient camouflage for the greed that drives the profit motive. It is an artificial justification for raising prices based on a ridiculous notion of subjective value. It is the LSD of greed which accelerates the accumulation of private wealth and stimulates the creation of enormous private capital empires.
Price instability actually occurs because we have no fixed standard to measure value. The tape measure we use to estimate value is made of elastic. The harder you pull on it, the more it stretches. A consistent measurement is almost impossible. Plus the units of measurement themselves, the dollars or Euros or Yen, are continually changing in value. Imagine trying to measure the dimensions of a box with an elastic tape measure that has a constantly changing scale of inch marks. How frustrating and impossible would that be?
We need a fixed, universal, standard to measure value. Just like we have now for weight, or distance, or volume. The units of measurement themselves must be fixed and unchangeable, like inches or pounds or miles. Time would be an excellent increment for measuring value. Labor costs are already measured in hours, minutes and seconds. Capital depreciation costs could also be denominated in units of time based on the original time value to produce the asset.
Instead of risking private capital, a new type of interest-free, public investment capital could easily be made available to finance new productive projects. With prices set to fully compensate both capital and labor costs, there would be no need for any additional profits.
Too good to be true... it will never happen! Don't be too sure of that. Once the public fully understands these ideas, the demand for change will become unstoppable.