The short answer is most functions related to file and input/output operations where you don’t really now how long it’ll take to do the operation.
In most cases, you’ll either know it by experience, or you’ll look it up in the documentation of the various modules/plugins. For Templater it’s not marked directly, but the examples usually give the correct indication on whether you need it or not. For DataviewJS the asynchrous functions (aka those needing await should be marked with an hourglass in the documentation.
If you want to showcase either markdown, or code blocks, or dataview queries properly in a forum post, be sure to add one line before and one life after what you want to present with four backticks, ````. This will ensure that any other backticks (like for code blocks) is properly shown.
For the even worse case of inline code with backticks, like `= tp.file(…)`, you’ll need to write stuff like: