In the era of high interest rate, does it make more sense to pay down mortgage first?

Average annual return of SP500 is 7% ish, and you need to pay tax and there is risk of short-term volatility.

right now 30-year mortgage is 6.7%. this is risk-free and we don't pay tax. And I don't see rate going down in the near future.

So in that case should we pay down mortgage first instead of contributing to SP500 monthly?