Disclaimers are all about clarifying the relationship between you and your reader or audience.
You need to use disclaimers when there might be a misunderstanding about that relationship that could lead to your reader doing something that could end up hurting themselves. Once you understand that, writing a disclaimer is really easy.
Here are the 3 simple steps I use to write disclaimers:
1. Identify the potential misunderstanding
Example: I talk about legal topics that might sound like legal advice.
2. Debunk the misunderstanding
Example: I'm not giving you legal advice and you're not my client.
3. Deny responsibility (i.e. disclaim liability)
Example: Your situation is unique, and it's not my fault if the info I give doesn't apply to your situation, or if you decide not to get your own lawyer, and something bad happens.