Seems like the ideal career is to start somewhere big and successful enough that allows you to specialize (after some poor generalists sabotaged their own careers by making it a thriving environment for specialists). Because even small scale businesses think they should start by hiring specialists.
Only if a software or integration problem is labeled neatly with the system and expertise required one can afford such thinking. Is the issue in the front-end, backend, gateways, middleware stack, network or compute? But even more dangerous are ‚valuable‘ narrow experts designing systems without awareness of the limitations in all other layers.
I learned that the hard way. I used to think my science background as an asset but I stopped mentioning my science background after seeing people's reaction in interviews.
I’d then look over the profile trying to disprove my assumption. Lacking a very strong signal in mastery of something, I’d pass on the profile.
Only at small scales are full stack engineers valuable. Their value is not in the quality of their output but in their ability to deliver make shift with that avoids having to pay for specialist who can deliver quality.
Assuming there is product market fit then generalists are replaced by specialists. This is where the true value aligns in terms of high quality output being compensated proportional to value created.
Given all this my advice is to pick two complementary areas, specialize in those areas and develop deep mastery. Keep your broad general skills. Then market yourself as the T or H shaped engineer that’s most valuable.