Mine is certainly not the normal path, and there were several significant projects which only peripherally advanced my career, so ymmv (greatly). But I guess my best advice is to find a niche. There are endless numbers of "Java Architect 2"s or whatever in the labor market, but
far fewer highly skilled engineers who understand deep business domains. Find your niche. You don't have to be a manager to develop close relationships with customers/users and understand their pain points. Become seen as invaluable (or at least really hard to replace) by your peers and senior management. And, of course, most engineers are underpaid. In case you've not read it, Patrick's essay is required reading for comp and career development.
https://www.kalzumeus.com/2012/01/23/salary-negotiation/
Good luck!