Except it's a global recession, bitcoin would be a better investment than stock. Bitcoin is not based in a particular country or country so the recession of one country won't crumble the price of Bitcoin. On the other hand, stocks are shares of companies and these companies are based in a country, so if that country goes into a recession, the company suffers thereby causing the value of their shares to drop because they won't be able to make much profit.
So if there is a recession in your country, in my opinion, bitcoin is the better investment.
Both stock and bitcoin are very volatile, but I don't believe it's fitting to compare stocks of all the companies to bitcoin alone. That's like comparing the whole cryptocurrencies to the stock of a company whose stocks are performing well.
I think that's also true during a global recession, like what we're experiencing now. After bitcoin was severely dumped in 2022 when we were at the height of the economic downturn, and it has recovered and grown better than any stock in the world to date. If someone had faith in bitcoin and had bought it when it was $15k-$17k, they would now be making almost 4x profits, which no other stock can do. So, in my opinion, bitcoin is always an investment that brings better returns than stocks in all economic situations, not just recessions.
Inflation is showing signs of going down and we are waiting for the Fed to lower interest rates and the world economy to enter a new growth phase, and I believe bitcoin will also grow better than stocks in the near future.