I've mentioned this before, but the best professional advice I got without knowing it was being told to "teach everyone" before I even became a professional educator.
You don't have to take it literally. I probably haven't taught people of every single age group. But, if you stick with a career long enough, you will be called upon to teach a different audience than the one you're most familiar with, and you must be able to do so.
In 2011, when I was still in grad school, I was looking for a better part-time job, and the business owner liked me and my personality, but he told me I needed more experience with adults because I was a bit too juvenile-oriented. At that point, I had only taught people up to the age of 20 or 21, and it showed.
Fast forward to now, and if you had to describe my career, it would be primarily adults.
I want to add to the original advice, though. It's not that you should just teach everyone. You should also teach everything.
Again, do not take this literally. If you want to excel, you can't just dabble and become some sort of dilettante. Teach history for a month and science for a week and grammar for a summer and professional development for a semester. No, you should (nay, must) build your skills within a broad realm (ELT? Adults? Early Childhood?), but don't become pigeonholed. Have you only taught preschool for wealthy kids? Then maybe you'll only be trusted with that population. And that could be fine, but it might not be.
If you get pigeonholed, and something happens, you'll be stuck. And if you're too unfocused, you will have built surface-level skills without rigor.
Focused versatility is the way to become a great educator.
And great educators, no matter what happens, will always be needed. I had a training today, with a guy who was exactly the way I hope my students see me. He was authentic and, above all else, sanguine. He was saddled with awful material, dry and poorly written (and surely not written by him), and yet he got us on his side and created a rapport with people whose names he will never know. That only comes from focused versatility. That's how it happens.