S&P500 is literally basket of stocks, it's like comparing apple to orange.
Invest your money in S&P500 is safe because it will certainly grow up with time and with long term investment, you will get profit. Invest money in a basket of stocks like this one, will be helpful for both risk management and profit earning opportunity. If you invest money in a single stock of a company, there is risk of losing money, even all of your initial capital if that company has a bankruptcy for example.
Gold on the other hand has always valued high from hundred of years ago.
There is no doubt about gold that is a very traditional investment asset, store of value, with very long history of existence and success. It's not bad to have gold in your basket of investment assets as it gives safety for your capital as well as chance of getting profit. However, if people want something more, with better ROI, they will look for something like Bitcoin.
I'm not gonna refute the fact that Bitcoin is fastest growing asset that goes from cents to $122,000 at ATH that's billion percent gain.
But comparing it to something that supposedly stable, large in valuation already between the range of time you selectively picked, feels disingenuous.
In coming years and cycles, Bitcoin ROI will become smaller but it's reasonable because with bigger market cap, Bitcoin won't be able to have very high ROIs like it had in the past.
It is interesting to watch Bitcoin growth and rank climb in the future in comparison and ranking table with the other assets.
https://companiesmarketcap.com/assets-by-market-cap/