Real Estate vs Stock Market
I selected IYR (as Real Estate proxy) and SPY and compare them over the last 24 years. This is expected but surprising to see the performance from 2001 - to date.

As seen in the bottom chart, the stock market just managed to rise above the Real Estate returns.
SPY (571%) vs IYR (549%)
But the picture changes if we start a little later. Here is the comparison every 4 years from 2001.
From 2005 - to date
SPY (574%) vs IYR (230%)

From 2009 - to date
SPY (707%) vs IYR (363%)

From 2013 - to date
SPY (372%) vs IYR (115%)

From 2017 - to date
SPY (182%) vs IYR (56%)

From 2021 - to date
SPY (59%) vs IYR (27%)

Here is the source code for producing these charts