I think a lot of it comes over time and, for cycling, putting in the miles. I have 33 years of riding in so far, and I remember in the early years I was really focused on my cyclometer, especially that damned pace arrow that told me whether or not I was at least holding my average pace for that ride. I remember the first time I did a 20 mile loop and held a 20mph average. Welcome to time trialing! It sucked, but I did it, and the memory has stuck. And I remember that time I did a 50 mile out-and-back, solo, with climbing, without food, no money, pre-cell phone era, and bonked horribly. I didn't know what bonking was. All I knew was that I thought I was going to die in a ditch on the side of the road. Since then, I bring food on longer rides (duh!), and I always keep a little bit of cash in my seat bag. In short, we learn some things about ourselves the hard way.
After maybe 10 years of riding I decided that I didn't like the cyclometer anymore. The numbers were sapping the fun out of riding. So I ditched it. That's when I really began to ride by feel, and for the longest time, the only metric I had at the end of a ride was what the garage clock said when I departed and returned, if I remembered to look at all. Now I have Strava, which I can turn on and slip into the pocket behind the headrest on my V, where I can't see it. It is the best of both worlds in that I now get some feedback, but not until after the ride. Yesterday I rode a 54 mile flat loop, took a stab at a KOM on a nine mile segment (got it by almost a minute), and arrived back home with a 23.1mph average, all by feel. I was happy with the result. The same loop the day before, or today, could yield a slightly different result based on a different feel. I say "slightly" because I know that my conditioning would be basically the same. What might make a difference from one day to the next could be sleep, diet, and mental acuity. Then again, the day before yesterday's ride, after a short mountain bike ride, I had four beers, which is kind of a lot for this 130 pounder. In hindsight, yesterday's ride should not have gone that well or that long, so I don't know. "Feel" is certainly a mystery.
My friend and I were recently in the last 10 miles of a gravel ride. He has ridden bikes plenty, but he is fairly new to cycling. He was soldiering on, but feeling it, so I settled into a rhythm and paced him those last 10 miles. He asked, "don't you ever get tired?" I didn't even know how to answer his question because I was riding so much on instinct, by feel, that I wasn't even aware that that was what I was doing. All I said was, "sure I do," and kept pacing him.
I don't say any of this to brag, for I have had plenty of days when the legs "feel heavy." This is only to say that for me, the best teachers have been time, miles, and occasional suffering. This year is the result of the 32 years that came before it.
Ride on!