Specialisation can work in many, sometimes perpendicular, dimensions: are you a generalist only as far as technologies are concerned, but have specialised in an organisational skill (eg. project management or engineering leaderhship)? I'm asking because being a generalist in all domains (functional, organisational etc.) feels like stretching out too much.
I have somewhat gone this route and I would say it isn't ideal - the logical trajectory becomes to gain deep domain knowledge and move into a psuedo technical role translating between executives / operational people and various technology specialities.
If you try to be a pure technologist with only average or less skill in everything and no area of deep technical skill, it is hard to progress to senior levels - because you are not better than a cheap junior at what ever they want you to do. They want T shaped people.
Your way out of this is to get a specialist role and stay in it for a few years, or to enter a knowledge intense domain like finance, medical, or science - and become a T shaped person who knows a lot about prop trading and a little bit about devops and web programming. Then you can supervise the specialists who do those things, with the domain knowledge to ensure they are building the right thing.
A qualification in the non techy domain subject of your choice is useful - qualify as a CPA, do a masters in financial engineering, or computational biology...
Media: Drawing, Painting, Illustrating, Writing, Music …
Web: The same as Media + Programming and System Administration
If you are a bit of a showman and know your way around food and drinks (wine, craft beer, whisky ...) there might be a place for you in restaurants, bars and so on. Media and web is still going to pay more.
If you had some skill of above average value you would specialize in that skill to maximize your returns.
If you don’t have such a skill you get minimum wage.
The ‘generalist’ who gets good results is either the recipient of privilege, a specialist in something high-value but invisible, or both.