There are all sorts of online tools you can use to write and format homebrew material, including D&D Beyond and The Homebrewery, an open-source tool that helps you to create homebrew that looks incredible and professional.  As for actually writing D&D homebrew content, having access to published sourcebooks helps a lot, as well as asking online community forums on platforms such as Reddit for advice or feedback.