How to motivate yourself to drive? You can't unless you know that it is required to go somewhere. Driving alone doesn't make sense (unless you just enjoy it). Same with writing. You have to "get it out" (intrinsic motivation) and you do it for some incentive (extrinsic motivation). Both are required. When intrinsic dies, extrinsic will pull. If extrinsic dies, intrinsic will pull.
This is something I came across last night: https://github.com/tsoding/faq#q-how-do-you-stay-motivated
P.S - I'm no expert. I spent like 10 mins writing, deleting, modifying, discarding and again writing this reply. The process was streamlining the thought process and edit it to have a most impact (tbh).