As pll04 says in their comment: the spectral theorem for Hermitian operators.
Let $\mathcal{H}$ be a Hilbert space. It is perhaps helpful to note that $\lvert \psi \rangle \in \mathcal{H}$ is simply a suggestive relabeling of an abstract vector. When represented w.r.t. to some basis $\{b_n\}$, $\lvert \psi \rangle$ is represented as a column vector:
$$\lvert \psi \rangle \xrightarrow{\text{basis}}
\begin{pmatrix}
\langle b_1 \lvert \psi\rangle \\
\langle b_2 \lvert \psi\rangle \\
...
\end{pmatrix}. $$
Via the dual correspondence,
$$\lvert \psi \rangle^\dagger = \langle\psi\lvert,$$
so a bra is a row vector when represented w.r.t. to a basis:
$$\langle \psi \lvert \xrightarrow{\text{basis}}
\begin{pmatrix}
\langle b_1 \lvert \psi\rangle^* &
\langle b_2 \lvert \psi\rangle^* &
...
\end{pmatrix}.$$
Fix your basis to be the basis which makes your Hermitian operator diagonal. Then, you can prove to yourself that the spectral decomposition of the operator and the diagonal form of the operator as represented as matrices are equal in this basis. Since representing vectors w.r.t. to a basis is performed via an isomorphism you can then abstract the matrices back into operators.