Sibling commenters seem to be confused.
Usually experts are T shaped. Acquiring expertise always means the time spent is away from learning something else.
The deeper and greater the expertise the more niche the topic usually becomes and the less demand there is.
The world might need X million web developers but how many experts are there in browser technology. Or even experts in that domain something more niche like rendering or rendering niche like Angle and WebGL..you already go this deep and it boils down to a handful of individuals.
Also I didn't say that there would not be demand just that many businesses are not willing to pay for it anymore. Industry layoffs, AI are huge leverages that any potential employer can use to have all the advantage when negotiating compensation.
The T shape is important - but the base of the T doesn't have to be in tech. If you're an expert in a particular niche and a generalist in a particular business you'll find work.
E.g., a web developer who knows a lot about how lawyers run their business.