Let $(\Omega,\mathcal{F})$ be a measurable space and $(\mathcal{F}_n)_{n \in \mathbb{N}}$ a filtration. If $\mathcal{F}$ is strictly bigger than $\mathcal{F}_{\infty} := \sigma(\bigcup_{n \in \mathbb{N}} \mathcal{F}_n)$, then the assertion fails to hold; see the comments for a counterexample. Therefore I will assume in the following that $$\mathcal{F} = \mathcal{F}_{\infty}.$$ Under this assumption, we are going to show that $$\mathcal{F}_{\tau} = \sigma \left( \bigcup_{n \in \mathbb{N}} \mathcal{F}_{\tau \wedge n} \right)$$ for any $(\mathcal{F}_n)_n$-stopping time $\tau:\Omega \to \mathbb{N} \cup \{\infty\}$. Recall that, by definition, $$\mathcal{F}_{\tau} = \{A \in \mathcal{F}; \forall n \in \mathbb{N}: A \cap \{\tau \leq n\} \in \mathcal{F}_n\}.$$
We start with some preparations.
Lemma 1: If $\mathcal{A}$ is a $\sigma$-algebra and $\Omega_0 \in \mathcal{A}$, then $$\mathcal{A} = (\mathcal{A} \cap \Omega_0) \cup (\mathcal{A} \cap \Omega_0^c).$$
Proof: Set $\tilde{\mathcal{A}} := (\mathcal{A} \cap \Omega_0) \cup (\mathcal{A} \cap \Omega_0^c)$.
If $A \in \mathcal{A}$, then $$A = (A \cap \Omega_0) \cup (A \cap \Omega_0^c) \in \tilde{\mathcal{A}}$$ On the other hand, if $A \in \tilde{\mathcal{A}}$, i.e. $$A = (B \cap \Omega_0) \cup (C \cap \Omega_0^c)$$ for $B,C \in \mathcal{A}$, then $A \in \mathcal{A}$ because $\Omega_0 \in \mathcal{A}$.
Lemma 2: If $\tau$ is a stopping time, then $\{\tau=\infty\} \in \mathcal{F}_{\tau}$ and $\{\tau=\infty\} \in \sigma(\bigcup_n \mathcal{F}_{n \wedge \tau})$.
Proof: The first statement is obvious from the definition of $\mathcal{F}_{\tau}$. For the second one, we note that $$\{\tau=\infty\} = \bigcap_{n \in \mathbb{N}} \{\tau>n\}.$$ Since $\{\tau>n\} \in \mathcal{F}_n$ and $\{\tau>n\} \in \mathcal{F}_{\tau}$, we have $\{\tau>n\} \in \mathcal{F}_n \cap \mathcal{F}_{\tau} = \mathcal{F}_{n \wedge \tau}$. Hence, $\{\tau=\infty\} \in \sigma(\bigcup_n \mathcal{F}_{n \wedge \tau})$.
Lemma 3: Let $\mathcal{G}$ be any family of sets and $\tau$ any mapping. Then $$\sigma(\mathcal{G}) \cap \{\tau=\infty\} = \sigma(\mathcal{G} \cap \{\tau=\infty\}).$$
Proof: Define $T:\{\tau=\infty\} \to \Omega, \omega \mapsto \omega$, then the assertion reads $$T^{-1}(\sigma(\mathcal{G})) = \sigma(T^{-1}(\mathcal{G})),$$ this identity holds for any mapping $T$ (see this question).
Theorem: Let $(\mathcal{F}_n)_{n \in \mathbb{N}}$ be a filtration and $\tau:\Omega \to \mathbb{N} \cup \{\infty\}$ a stopping time. Then $$\mathcal{F}_{\tau} = \sigma \left( \bigcup_{n \in \mathbb{N}} \mathcal{F}_{n \wedge \tau}\right).$$
Proof: Because of Lemma 1 and Lemma 2, it suffices to show that \begin{align}
\mathcal{F}_{\tau} \cap \{\tau<\infty\} &= \sigma \left( \bigcup_{n \in \mathbb{N}_0} \mathcal{F}_{n \wedge \tau}\right) \cap \{\tau<\infty\} \tag{1} \\
\mathcal{F}_{\tau} \cap \{\tau=\infty\} &= \sigma \left( \bigcup_{n \in \mathbb{N}_0} \mathcal{F}_{n \wedge \tau}\right) \cap \{\tau=\infty\} \tag{2}.
\end{align}
Proof of $(1)$: Since $\mathcal{F}_{n \wedge \tau} \subseteq \mathcal{F}_{\tau}$, it suffices to prove '$\subseteq$'. Take $F' = F \cap \{\tau<\infty\}$ for $F \in \mathcal{F}_{\tau}$. Then $$F' = \bigcup_{n \in \mathbb{N}} \underbrace{F \cap \{\tau \leq n\}}_{\in \mathcal{F}_{n \wedge \tau}} \cap \{\tau<\infty\} \in \sigma \left( \bigcup_{n \in \mathbb{N}_0} \mathcal{F}_{n \wedge \tau}\right) \cap \{\tau<\infty\}.$$
Proof of $(2)$: By the definition of $\mathcal{F}_{\tau}$, we have \begin{equation}
\mathcal{F}_{\tau} \cap \{\tau=\infty\} = \mathcal{F}_{\infty} \cap \{\tau=\infty\}; \tag{3}
\end{equation}
'$\subseteq$' is obvious; for the other inclusion take $F' = F \cap \{\tau=\infty\}$ for $F \in \mathcal{F}_{\infty}$, then $F \cap \{\tau=\infty\} \in \mathcal{F}_{\tau}$ (any subset of $\{\tau=\infty\}$ is in $\mathcal{F}_{\tau}$) and so $$F' = (F \cap \{\tau=\infty\}) \cap \{\tau=\infty\} \in \mathcal{F}_{\tau} \cap \{\tau=\infty\}.$$ Moreover,
\begin{equation}
\mathcal{F}_{n \wedge \tau} \cap \{\tau=\infty\} = \mathcal{F}_{n} \cap \{\tau=\infty\}\tag{4}
\end{equation}
Indeed: Again '$\subseteq$' is obvious. If $F' = F \cap \{\tau=\infty\}$ for $F \in \mathcal{F}_n$, then $$(F \cap \{\tau>n\}) \cap \{\tau \wedge n \leq k\} \in \mathcal{F}_k$$ and so $F \cap \{\tau>n\} \in \mathcal{F}_{\tau \wedge n}$; thus, $$F' = (F \cap \{\tau>n\}) \cap \{\tau=\infty\} \in \mathcal{F}_{n \wedge \tau} \cap \{\tau=\infty\}.$$
Finally, \begin{align*}
\mathcal{F}_{\tau} \cap \{\tau=\infty\}
\stackrel{(3)}{=} \mathcal{F}_{\infty} \cap \{\tau=\infty\}
&= \sigma(\mathcal{F}_n; n \in \mathbb{N}) \cap \{\tau=\infty\} \\
&\stackrel{\text{Lem 3}}{=} \sigma(\mathcal{F}_n \cap \{\tau=\infty\}; n \in \mathbb{N}) \\
&\stackrel{\text{(4)}}{=} \sigma(\mathcal{F}_{n \wedge \tau} \cap \{\tau=\infty\}; n \in \mathbb{N}) \\
&\stackrel{\text{Lem 3}}{=} \sigma(\mathcal{F}_{n \wedge \tau}; n \in \mathbb{N}) \cap \{\tau=\infty\},
\end{align*}
which proves $(2)$.