I've felt similar to you for a long time, but have recently (over the last year) had a fundamental shift. I'm loathe to ever recommend self-help books (I used to work in publishing, and I know how most of those books get written. Hint: Not by the author, and not based on real research.), but I'd really recommend picking up Atomic Habits.
The big aha moment for me was in the separation of systems and goals. I always struggled with the same kind of procrastination as you--if there was a pressing need, I'd rise to the occasion, but otherwise was content with the minimum--despite having large ambitions (am also strongly considering a PhD, weirdly enough). The book does a nice job of explaining goals as things that are distant, and so can really never be "pressing" or rewarding short term, whereas systems can have a pulling effect i.e. I don't have one singular side project with a schedule that I'm constantly failing to hit, I have a system in which I write code for fun for at least an hour each morning, during which time I let myself listen to new music and try random ideas while I have coffee.
I might not hit peak productivity, but I do it everyday because I enjoy it. I look forward to it when I wake up. The system pulls me in, and as a result, I'm actually way more productive overall.