Possible recession

I’ve been investing in the S&P 500 every day, but I’m starting to worry about a recession. My financial advisor pointed out the inverted yield curve and said it could be a sign of a downturn that might last for years. I’m feeling unsure—should I stick with my current strategy, or is it time to rethink things?