No money "flows into" or "flows out of" the stock market or the bond market. Every security must be held by exactly one person until it is retired. (Let's set aside new issues, buybacks and mergers for now. They are a small percentage)
There is no money in the market at all. When you buy a share of stock, someone else is selling it to you. Your $100 becomes their $100.
The effect of recent monetary policy is that we now have a huge amount of zero-interest money sloshing around the economy. So your counter-party needs to do something their new $100. Putting it in zero-interest T-bill is not appealing, so maybe by another stock? Maybe real-estate? Crypto?
So we ave all this new money flowing though the system pushing up all asset prices.
It's also a big driver of the startup boom. Because not only do startups potential provide good returns, but they actually use the money to create jobs and build things.