Who says you can’t do both?You don’t! Just keep saving and investing.
All it takes is discipline.
I put away 10% - 15% of my income my entire life, and always took advantage of any company match. I also had an emergency fund AND about 5% - 10% in cash for opportunities.