Overall, the fundamental career decision is whether your goal is to join "big tech" or to be at a startup/small business/non-tech firm.
If the goal is to be at Google/Amazon/etc, I'd probably suggest an overall strategy of "pick something relatively narrow, and be the best in the world at it". Big Tech firms tend to be the land of experts -- there are fewer job titles of "full-stack engineer", and more of "we have enough engineering resources to have specialists for everything".
For small companies (or small tech teams), it's the opposite. There is a ton of value of being able to be able to move up and down the stack -- Sales, Product, Design, Frontend, Backend, Devops... and pinch hit in any job capably as needed.