Isn't this true for just about any skill, not just math and computer science? You're only going to get better at tennis by playing tennis. Or piano. Or woodworking. Or communication skills. Best way of learning is actually doing the thing, not reading about doing the thing.
This is basically what I've learned as well by going to therapy and has dramatically improved my life as I've began to embrace what I'm excited about and say no to activities, people, and hobbies that don't align with my values.