Let $F$ be a totally real field or CM field, $n$ be a positive integer, $l$ be a prime, $\pi$ be a cohomological cuspidal automorphic representation of $\mathrm{GL}_n$ over $F$ and $v$ be a non-$l$-adic finite place of $F$. In 2014, Harris-Lan-Taylor-Thorne constructed the $l$-adic Galois representation corresponding to $\pi$. (Scholze also constructed this by another method.) The compatibility of this construction and the local Langlands correspondence at $v$ was proved up to semisimplification by Ila Varma(2014), but the compatibility for the monodromy operators was known only in conjugate self-dual cases and some special $2$-dimensional cases. In this talk, we will prove the local-global compatibility in some self-dual cases and sufficiently regular weight cases by using some new potential automorphy theorems. Moreover, if we have time, we will also prove the Ramanujan conjecture for the cohomological cuspidal automorphic representations of $\mathrm{GL}_2$ over $F$, which was proved in parallel weight cases by Boxer-Calegari-Gee-Newton-Thorne (2023).