For common abbreviations, like "D&D", everyone knows what you're talking about. However other, lesser known ones can lead to confusion.
Sometimes you can take it from context, but the best option is to lead with the full phrase, followed by the abbreviation, to clarify.
Leomund's Tiny Hut (LTH)
This way it is clear what you're referring to.
As for knowing what requires the abbreviation - common phrases like D&D, AC, DC, CR are usually fine, as they are common abbreviations that everyone use. However things like spells or abilities are a bit more "niche". Therefore abbreviating those are more of a cop-out, rather than having to type the whole phrase everytime.