Should you write "don't" or "do not"?

It depends.

Contractions are the default in everyday writing such as emails, dialogue, and conversational prose. But they're almost always absent in scholarly papers, legal writing, formal business documents, and (surprisingly) newspaper journalism.

Match your tone to your audience. Casual and approachable? Contract away. Formal and authoritative? Spell it out.

Read more: https://www.quickanddirtytips.com/articles/when-you-should-use-and-avoid-contractions/

@grammargirl You can also use both within the same piece, depending on the tone you want to convey at any particular moment. (I'm doing just that as I write a new blog post.) I'm surprised how often this isn't mentioned!