While it is ideal to make all your music on your best sounding system, using speakers instead of headphones, this isn't critical to all parts of the production chain. Mastering should never be done on headphones. And mixing 100% on headphones is generally a bad idea unless you do many, many checks on other systems. But for song creation? Composition? Sound-design? There's no reason why you couldn't do these on good headphones.
Your listening system, be it speakers or headphones, needs to have enough fidelity for you to hear what you're doing. You need to be able to hear subtle effects behind instruments, hear reverb trails in a dense mix, etc., to be able to create them. Fidelity is actually cheaper to achieve with good headphones. I'm very happy with my AKG k702.
But fidelity aside, you probably won't be able to achieve a perfectly accurate monitoring system. Very, very few engineers have perfectly accurate systems. But good engineers know their speakers or headphones inside and out. They know how things should sound on them, and what they don't do well. Then they compensate. I know that if I mix with my k702 headphones, I'll add way too much 50 Hz to make it sound good to me, and it won't translate well to other systems. So if I mix on those headphones, I know to keep the bass sounding light at 50 Hz. And if I had to work that way all the time, I'd become very good at judging how much bass I should hear on my headphones in order to sound good on other stereos.
Whatever you mix on, speakers or headphones, use them to listen to everything in every genre. Bands you like, famous recordings, YouTube videos, movies, etc. Know how they sound, and know how things sound on them. Then make your music sound the same way on those speakers or headphones instead of making it sound perfect. That's what good engineers do: they compensate for their monitoring system's flaws.
And using reference tracks really helps. If you want your mix to sound like Drake or Katy Perry, then switch back and forth between your mix and Drake's or Katy Perry's. Hear how loud the kick drum is, the snare drum, the vocals, etc. If that mix sounds super crispy, make yours sound equally crispy. Because the crispiness is likely in your headphones, not their music. If their kick drum sounds quiet, make yours sound quiet too. This will help you make music that translates.