The key for me was learning to actually manage time better. The challenges of having a kid have made me see how little time for other things I have now, which in turn made me manage that time better. Previously, I'd fall into the trap of "there's so much time" that I could easily waste it. A whole evening free, planning to work on a side project? First I do something else, get carried away, then figure it isn't worth working for just two hours, and so waste the whole evening. Now I'm much better at using the time. An hour free? I can do some actual coding. Fifteen minutes free? I won't start coding, but I'll maybe update the SSL certificates on my server or read an article I've been planning to.
Yes, there are periods where that doesn't work. There can be three days where I have less than an hour combined to myself. Or some nights of such bad sleep that my creativity is at a zero. Speaking of sleep, I also made a habit of sleeping more after having a kid, and honestly it's a productivity booster. Sleeping for 7-7.5 hours means I can accomplish more the next day than sleeping for 6 hours. Having the right day job definitely helps. I'm very lucky in that my commute is fifteen minutes door-to-door, and that I have a quiet working environment.
Even in the best case, you have to give up some things - I haven't seen a full length movie in two years, rarely watch any series, and it sure takes me longer to get through a book. But at least in my experience, becoming a parent doesn't have to mean putting all learning and personal/freelance projects on hold for a few years.