The problem is it's easy to lie to yourself & say that you're a generalist when in reality you've tried a bunch of things and you've flaked out when things got hard and tried something else.
It's easy to do this repeatably & say "But I'm a generalist"
You want to be at least great at one thing, and then apply that lens or skill to other categories.
Tyler Cowen says he specializes as a generalist, but he spent a couple decades going deep on economics.
Gladwell writes about lots of topics, but he's mastered the art of translating academic work for a mass audience.
It’s advice that will make you slightly above average, but not excellent.
Switch paths if unfruitful, but do try to be great at something.