Obsidian supports LaTeX math via MathJax. Please note, that MathJax doesn’t provide a full LaTeX environment. Only math-mode macros are supported.
You can add your custom macros by putting them in your Markdown document. Unlike actual TeX, however, in order for MathJax to process such definitions, they must be enclosed in math delimiters (since MathJax only processes macros in math-mode):
$\require{mhchem}$
$\newcommand{\dd}{\operatorname{d}}$