In-line formulas are part of LaTeX’s extended syntax, not Markdown’s general standard. In order for Typora to parse, it is necessary to check “inline formula” in “File” – “Preference Settings” of Typora, as shown in the picture below.

Note: Since this syntax is not a universal standard but rather an extension, it may not be parsed in many other Markdown editors.

After the check is complete, you need to restart Typora to use it.