I've recently had a bout of writer's block after coming out of another one just a few weeks ago. What are some habits I can learn to stop getting them so frequently?
Here are some ways to overcome writer's block:

1. Enhance Your Workspace

A clean workspace means less visual and physical distraction from your goal. This doesn't mean making your workspace absent of decorations, this means making your workspace a place you want to work. Your productivity will go up a significant margin if you don't have much to fumble around with distracting objects or other assignments physically. Make your workspace your own.

2. Plan a Time and Make a Habit

Sometimes you just need to designate a proper time to do your work. Most people operate well when they give themselves some form of assignment or time urgency to a victory or a goal. Reducing delays earns you bonus points, as long as the delays aren't more critical to your success or other goals.

3. Try a Writing Prompt

As in all mental blocks or hurdles, writer's block means you haven't asked the right question (or number of questions) to get you an answer. Prompting yourself by asking relevant questions is an excellent way to guide yourself to meet your own or other's expectations. Sometimes dividing tasks into subtasks explicitly is efficient, or figuring out order of importance (chronologically, sociologically, etc.) amongst a chaos of relevant ideas.

4. Accept flaws as they come

You are not perfect, and neither is anyone else; that includes your audience. Amongst complexity, making everything to a level of perfection requires a ton of work from zero. You do not need to use your entire brain and existence on every word, idea, thought, or sentence. You can come back to your ideas later to edit them if they can be said in a more logical or more efficient manner. Using mildly relevant ideas can sometimes make you question yourself to write more correct or more relevant ideas later on.

5. Read more often

This trains your brain to outsource for inspiration. Some authors have already done so much work in the space of language, logic, and storytelling, that you yourself would benefit from exploring the hive mind of ideas that are in existing libraries. You don't need to come up with new ideas all the time, you can sometimes find inspiration in patterns that other authors use. English is a language of many different possibilities, and sometimes you can find efficiency and precision in the works of trained authors.

6. Exercise

Physically moving your body around for 90 or more minutes of a day has been proven through theory and study to (generally) positively affect other areas of intelligence (although every minute of meaningful exercise seems to help). Physically exercising is what your body has been designed to do after hundreds of millions of years of evolution. Moving around moves your body fluids around which improves your immune system, reduces nerve inflammation, reduces risk of chronic disease, and so much more neurological benefits that haven't been yet fully explored.