Both help address major risks that face early-stage companies: market risk (that you can reach customers in a sustainable way) and product risk (that customers want what you’re building).
Pursuing both traction and product in parallel will increase your chances of success by both developing a product for which you can actually get traction and getting traction with that product much sooner.