Surfers don’t create the waves. They know how to react to the wave when it arrives, and ride it without wiping out.
In the same way, experienced musicians ride the music. It’s not about counting beats or having accurate cutoffs. It’s about trusting the flow of the music, feeling the large structures and knowing which way to lean to stay in sync.
Inexperienced soloists will often end up a bar late or early, maybe because they’ve been counting rests but miscount under stress. Experienced soloists almost never make such a mistake, because they know, consciously or not, the structure of the music and how their melody fits in.
I don’t think there’s any way to get to be a proficient surfer besides wiping out a whole bunch of times; and the same is true of music. The more chances you have to try to surf the music, ideally with live musicians, the more quickly you’ll learn how to surf on the music.