In "Measure Theory and Probability Theory" by Krishna and Soumendra pag. 43 there is the following passage.
Let $(\Omega, \mathcal{F})$ be a measurable space and $\{f_n\}$ a sequence of functions such that $f_n:\Omega \rightarrow \mathbb{R}$ is a measurable function for each $n\ge 1$.
Let $\bar{\mathbb{R}}=\mathbb{R} \cup \{+\infty, -\infty\}$ be the extended real line and $\mathcal{B}(\bar{\mathbb{R}})=\sigma\left<\mathcal{B}(\mathbb{R}) \cup \{+\infty\} \cup \{-\infty\}\right>$ be the extended Borel $\sigma$-algebra on $\bar{\mathbb{R}}$.
Define $g= \Omega \rightarrow \bar{\mathbb{R}} $ as the supremum pointwise $g=sup_{n \ge 1}f_n$.
Then the book says that for show $g$ being measurable is enough to show that $g^{-1}((-\infty, r]) \in \mathcal{F}$ for each $r \in \mathbb{R}$. Thus it continues with the proof below.
$(-\infty, r] = \{\omega: g(\omega) \ge r \} = \\ \bigcap_{n=1}^{\infty} \{\omega: f_n(\omega) \ge r \}=\\ \bigcap_{n=1}^{\infty}f_n^{-1}((-\infty, r]) \in \mathcal{F} $
since $f_n^{-1}((-\infty, r]) \in \mathcal{F}$ for all $n \ge 1$ by the measurability of $f_n$.
What assures us that the countbale intersection of those sets is in $\mathcal{F}$?
You prove this using De-Morgan's law. Since the $\sigma-$algebra is closed under countable unions and under complements, and since by De-Morgan, the complement of the union is the intersection of the complements, then you get that the countable intersection of measurable sets must also be measurable.