It’s important to know one thing in depth, building a solid skill at one subject will help you in positioning yourself in that subject.
You don’t have to keep working in that field. But, achieving a mastery level takes time. And you should spend fairly good amount of time in that field.