I am confused by the last line in the proof that $\mathbb{P}^1$ is not affine, as presented in Ravi Vakil's algebraic geometry notes.
First, he computes the ring of global sections. It turns out that $\Gamma(\mathbb{P}^1,\mathcal{O}_{\mathbb{P}^1})=k$. This is all fine. What confuses me is the next line. He says: "If $\mathbb{P}^1$ were affine, then it would be $\operatorname{Spec}\Gamma(\mathbb{P}^1,\mathcal{O}_{\mathbb{P}^1})=\operatorname{Spec}k$, i.e., one point. But it isn't -- it has lots of point."
I don't know what to make of that sentence. In the second equality, isn't he just taking $\operatorname{Spec}$ of both sides of the first equality? If so, what does this have anything to do with assuming $\mathbb{P}^1$ is affine? Further, why do we know $\operatorname{Spec}\Gamma(\mathbb{P}^1,\mathcal{O}_{\mathbb{P}^1})$ should have "lots of points"? In short, what am I missing here?
Edit: The question linked does not answer my question. I am asking about a specific line in this proof given by Vakil. The linked questions only asks why $\mathbb{P}^1$ is not affine in general. Further, none of the given answers there address my concern. The chosen answer uses dimension theory, which is clearly not what Vakil had in mind since dimension theory hasn't been discussed yet