I don’t think that’s quite true - I would say a better definition would be that a company is worth what someone will pay for it, regardless of if you actually sell it or not.
Stocks, piles of gold and cash are just different types of asset all of which have value.
And you have to really tax all of that, otherwise the wealthy will just avoid taxes by being paid in untaxable gold bricks and trade those for purchases rather than dollars.