Most productivity advice for developers is really about tools. In practice, the biggest gains come from a few habits that remove friction and keep momentum. None of them is dramatic, which is why they work.
Define "done" before you start
Write one sentence describing what will be true when the task is finished. It prevents scope creep and makes it obvious when to stop. If you cannot write the sentence, you are not ready to start coding yet.
Work in small, shippable slices
Break features into steps that each leave the project working.
Commit often with messages that explain why, not just what.
Merge small changes frequently instead of one enormous change at the end.
Protect focused time
Deep work is fragile. Block a couple of uninterrupted hours for the hardest task, silence notifications, and batch messages and reviews for later in the day.
Automate the boring parts
If you do something more than three times, script it. Formatting, linting, running tests and deploying are all good candidates. The first automation takes longer than doing it by hand; every later one is free.
Keep a running notes file
Record commands you looked up, errors you solved and decisions you made. Searching your own notes is faster than searching the internet again, and it doubles as raw material for blog posts.
Learn on purpose
Pick one topic at a time.
Build something small with it within a week.
Write up what you learned in your own words.
Explaining a concept is the quickest test of whether you understand it.
Review weekly
Spend fifteen minutes each week looking at what you finished, what got stuck and what to drop. Small course corrections every week beat large ones every quarter.