If you want to know how the stock market works, you need to understand the concept of arbitrage. Arbitrage is fairly simple, but if you think of the ol’ market maxim: Buy low, sell high. That is all it is.
The most classic example that I have ever heard about was in the early 1970’s, and involved a side bet by the traders on the floor of the NYSE. No, not anything hinkey about stocks and securities. Instead, they recognized that in 1964 when the US Treasury department moved from silver coinage to clad coinage, that led to a hard delineation of the base metals in the coinage. Prior to 1965, dimes, quarters, half dollars and dollar coins were made from an alloy of silver. After the decoupling of the coinage to the value of the base metal, that allowed silver to float in price. While through the late 1960’s its value was muddling about, it began to rise, and that caught the attention of the traders.
In their spare time, they would buy bags of loose currency coinage, and then sort through looking for the older, silver coins, melt them down, and sell the base metal on the market. Turning a tidy profit for a simple exercise.
Or take the eBay system that one of my favorite Youtube authors, Kevin Talbot, pitches. You find things that people want to buy, then look for places to buy them in bulk for less, buy them, advertise them, and sell them piecemeal for profit. Every grocer, market, or other business plays this game.