One should not confuse the two different statements :
a) The sections $x^2,y^2,z^2$ generate the $k$-vector space $\Gamma(\mathbb P^2_k,\mathcal O(2))$, which happens to be false.
b) The sections $x^2,y^2,z^2$ generate the line bundle $O(2)$, which happens to be true.
a) The first statement probably needs no further eleboration since the $k$-vector space $\Gamma(\mathbb P^2_k,\mathcal O(2))$ is the 6-dimensional space $k[x,y,z]_2$ of homogeneous polynomials of degree 2, which obviously cannot be generated by only 3 vectors.
b) And what does the second statement even mean? It means that that the fibre of $\mathcal O_{\mathbb P^2_k}(2)$ at any point $P\in \mathbb P^2_k$ is generated by the values of the three sections at $P$.
Since the fibres of at any $P\in \mathbb P^2_k$ are 1-dimensional, the condition just states that the three sections do not vanish simultaneously at $P$.
And this is indeed the case since at any $P\in \mathbb P^2_k$ it is impossible to have simultaneously $x^2=y^2=z^2=0$ .
[It is also vital to carefully distinguish between the stalk $\mathcal (O(2))_P$, which is a free module of rank one over $\mathcal O_P$ and thus an infinite-dimensional vector space over $k$, and the fibre $\mathcal O(2)_P\otimes_{O_P} k$ which is a 1-dimensional vector space over $k$.]