In my current understanding, a vector space should be provided before talking about the span of one of its subset. (Correct me if this is wrong...)
I'm reading the proof below in my book, but I'm not sure whether it goes like this:
I have to first assume that "$V$ is generated by $S$", now since $V$ been given, $S$ is a subset of $V$. Then since $\beta=\{u_1,u_2,\dots,u_k\}$ picked out from $S$, so it's also a subset of $V$. So now I can say $\textrm{span}(\beta)\subseteq V.$ And now combine it with the last part of the proof then $V=\textrm{span}(\beta).$
Is this thinking process correct?

The key fact is that if $\beta=\{u_1,\dots,u_k\}$ is linearly independent and $v\notin\operatorname{span}(\beta)$, then also $$ \beta'=\{u_1,\dots,u_k,v\} $$ is also linearly independent (proof below).
The procedure of adding new elements to $\{u_1\}$ stops when all remaining vectors are in the span of the found ones, forming the set $\beta$.
Since all vectors in $S$ are now in the span of $\beta$, you conclude that $S\subseteq\operatorname{span}(\beta)$ and so $\operatorname{span}(S)\subseteq\operatorname{span}(\beta)$. On the other hand, from $\beta\subseteq S$, you can conclude that $\operatorname{span}(\beta)\subseteq\operatorname{span}(S)$.
Hence the two spans are the same.
Proof of the claim. Let $a_1u_1+a_2u_2+\dots+a_ku_k+bv=0$. If $b\ne0$, then $$ v=(-b^{-1})a_1u_1+(-b^{-1})a_2u_2+\dots+(-b^{-1})a_ku_k $$ which is a contradiction to $v\notin\operatorname{span}(\beta)$. Therefore $b=0$ and then $a_1u_1+a_2u_2+\dots+a_ku_k=0$; by linear independence of $\beta$, also $a_1=a_2=\dots=a_k=0$.