The topic of habits is mentioned in almost every self-help book. And it is no wonder why. If I look back at what helped me last year it was just a few habits that had a tremendous impact on me. And the same seems to be true for my work as a developer.
For me, note-taking was an ad hoc thing that was painful, but over time I managed to get better at it and even be able to have a system. The more projects, places to do things, and how to you will have the more you appreciate good note-taking systems. You will stop to ask your colleagues for that link to documentation and googling how to connect to that strange DB your backend is using, you just open your notes and there it will be.I use zettelkatsen combined with a second brain system but there are endless options.
Commit clean up
Before each commit, I go through the diff, file after file, and fix all the small issues I found. Forgotten console.logs, commented code you name it I take care of this mess before it will go public. Doing this allows your coworkers to focus on important things during the code review, instead of focusing on where you left commented code.
We work in an ever-changing environment, with new frameworks, libraries, languages... Regular reading will allow you to have an overview of the emerging technologies. Pick a few quality sources (Twitter accounts, newsletters...) and regularly check them. But have in mind that you do not need to learn everything you will read about.
Resistance is a concept from Steven Pressfield and his book war of art. For me regularly reminding myself that the reason why I want to "just check Twitter before I start to code that functionality" is just because I do not want to fight the resistance.
You will break all your habits. Even the most bake in. So why not automate them? Running test before commit? Automate it, linting your code? The same. We have tools for all of this so take advantage of them and make your life easier.
Those are the most important habits that help me with my work. There is nothing magical about them and building them hurts, but working without them would hurt me much more.