You can have the best infrastructure, best pipelines, devops, security, frameworks, styleguides, libraries, etc. etc. Sadly none of that means you're building something anybody wants.
You can spend years building something undoubtedly technically amazing. Yet if you didn't make sure there was a market first you face the very real prospect that people will go "That's nice, why do I care?"
Your advice is great for a personal project that you don't intend to directly make money with. Still would be excellent on a resumé however.