This an explanation of why the definition in your textbook is equivalent to point $(2)$ in the answer by Alexis Olson; it’s much too long for a comment. It does require a little familiarity with transfinite recursion; in particular, you need to know that $\omega_1$ is the first uncountable ordinal. I’ve added a couple of analogous closure constructions in hopes of making the idea a bit clearer.
Let $\mathscr{A}$ be a collection of subsets of $X$. We can define $\sigma(\mathscr{A})$ from the outside in, as the intersection of all $\sigma$-algebras containing $\mathscr{A}$, or from the inside out, by adding to $\mathscr{A}$ the bare minimum collection of subsets of $X$ needed to expand $\mathscr{A}$ to a $\sigma$-algebra.
To do the latter, let $\mathscr{A}_0=\mathscr{A}$. Given $\mathscr{A}_\alpha$ for some ordinal $\alpha<\omega_1$, let $\mathscr{C}_\alpha=\{X\setminus A:A\in\mathscr{A}_\alpha\}$, the set of complements of members of $\mathscr{A}_\alpha$. Then let
$$\mathscr{A}_{\alpha+1}=\left\{\bigcup\mathscr{S}:\mathscr{S}\subseteq\mathscr{C}_\alpha\text{ and }\mathscr{S}\text{ is countable}\right\}\;,$$
the family of all unions of countable subcollections of $\mathscr{C}_\alpha$.
Example. If $X$ is a topological space, and $\mathscr{A}$ is the family of all open sets in $X$, then $\mathscr{C}_0$ is the family of all closed sets in $X$. $\mathscr{A}_1$ is the family of all unions of countably many closed sets, so it’s the family of all $F_\sigma$-sets in $X$. $\mathscr{C}_1$ is the family of all complements of $F_\sigma$-sets in $X$, so it’s the family of all $G_\delta$-subsets of $X$. (The complement of a union of countably many closed sets is the intersection of countably many open sets.)
If $\alpha$ is a limit ordinal, let
$$\mathscr{A}_\alpha=\bigcup_{\xi<\alpha}\mathscr{A}_\xi\;,$$
and keep going.
Proposition. $\mathscr{A}_{\omega_1}$ is a $\sigma$-algebra.
Proof. If $A\in\mathscr{A}_{\omega_1}$, then there is an $\alpha<\omega_1$ such that $A\in\mathscr{A}_\alpha$. Clearly $X\setminus A\in\mathscr{C}_\alpha$, and $\{X\setminus A\}$ is a countable subset of $\mathscr{C}_\alpha$, so $\bigcup\{X\setminus A\}=X\setminus A\in\mathscr{A}_{\alpha+1}\subseteq\mathscr{A}_{\omega_1}$. Thus, $\mathscr{A}_{\omega_1}$ is closed under complementation.
Let $\mathscr{S}$ be a countable subset of $\mathscr{A}_{\omega_1}$. For each $S\in\mathscr{S}$ there is an $\alpha(S)<\omega_1$ such that $S\in\mathscr{A}_{\alpha(S)}$. Then $\{\alpha(S):S\in\mathscr{S}\}$ is a countable set of ordinals less than $\omega_1$, so there is a limit ordinal $\beta<\omega_1$ such that $\alpha(S)<\beta$ for each $S\in\mathscr{S}$. By definition $\mathscr{A}_{\alpha(S)}\subseteq\mathscr{A}_\beta$ for each $S\in\mathscr{S}$, so $\mathscr{S}\subseteq\mathscr{A}_\beta$, and hence $\{X\setminus S:S\in\mathscr{S}\}\subseteq\mathscr{C}_\beta$.
We showed in the first paragraph that $\mathscr{C}_\beta\subseteq\mathscr{A}_{\beta+1}$, so $\{X\setminus S:S\in\mathscr{S}\}\subseteq\mathscr{A}_{\beta+1}$, and therefore, taking complements again, $\mathscr{S}\subseteq\mathscr{C}_{\beta+1}$. That is, $\mathscr{S}$ is a countable subset of $\mathscr{C}_{\beta+1}$, so by definition $\bigcup\mathscr{S}\in\mathscr{A}_{\beta+2}\subseteq\mathscr{A}_{\omega_1}$, and $\mathscr{A}_{\omega_1}$ is therefore closed under taking countable unions. Thus, $\mathscr{A}_{\omega_1}$ is a $\sigma$-algebra containing $\mathscr{S}$.
At every stage of the recursive construction of $\mathscr{A}_{\omega_1}$ we added only sets that have to be in any $\sigma$-algebra containing $\mathscr{S}$: we added only complements of sets that we already had and countable unions of sets that we already had. We just kept adding these required sets until we got to a point at which we could prove that no further additions were required. We could keep going, letting $\mathscr{C}_{\omega_1}=\{X\setminus A:A\in\mathscr{A}_{\omega_1}\}$ and so on, but all of the families $\mathscr{C}_\alpha$ and $\mathscr{A}_\alpha$ for $\alpha\ge\omega_1$ are just $\mathscr{A}_{\omega_1}$ all over again, since that family is already a $\sigma$-algebra: taking complements and finite unions gets us nothing new at this point.
Analogies. In a topological space $X$ we can define the closure of a set $A$ from the outside in, as the intersection of all closed sets containing $A$, or from the inside out, as $A\cup A'$, where $A'$ is the set of accumulation points of $A$. The outside-in approach works because the intersection of closed sets is closed. The inside-out approach works because we don’t add to $A$ anything that doesn’t have to be in every closed set containing $A$, and we do add enough to get a closed set.
In a group $G$ we can define the subgroup $\langle X\rangle$ generated by a subset $X$ of $G$ from the outside in, as the intersection of all subgroups of $G$ containing $X$, or from the inside out, by recursively closing $X$ under the group operation and under taking inverses in a manner similar to the construction of $\mathscr{A}_{\omega_1}$ above; the main difference is that only $\omega$ steps are required instead of $\omega_1$, so that we can actually write down the generated group at one go, as in this answer.