Line bundles on $S^2$ and $\pi_2(\mathbb{R}P^2)$ Real line bundles on $S^2$ are all trivial, but what about the following way to think about a line bundle: we view a line bundle on $S^2$ (thought of as living in $3$d space) as providing a map $S^2 \to \mathbb{R}P^2$ the space of lines; and since $\pi_2(\mathbb{R}P^2) \simeq \mathbb{Z}$ we should have a $\mathbb{Z}$ worth of different line-bundles.
Clearly I've cheated very badly in the latter line of thought; but I perhaps am still a bit confused at what step I have cheated so badly; is it that the following intuition just makes no sense?

*

*if I have a manifold $M \hookrightarrow \mathbb{R}^n$ and a line bundle $L \mapsto M$; can I always find a vector field $V$ on $\mathbb{R}^n$ that is not zero anywhere on $M$, such that the line bundle $L$ looks like what you get from 'integrating $V$ around $M$'? I think this is another way of saying my inuition that line bundles come from maps $M \to \mathbb{R}P^{n-1}$ which might be totally wrong; and which I'm not too sure how to formalise

EDIT : I just realised since $\pi_2(\mathbb{R}P^3)$ is trivial, even if my intuition above was correct, you'd still have just the trivial line bundle on $S^2$ since you can always "view the lines in a higher dimension" and rotate them away; if that makes any sense. Sorry if this is all just gibberish: just trying to learn
 A: The classifying space of real line bundles is $\mathbb{RP}^{\infty}$, not $\mathbb{RP}^2$; $\mathbb{RP}^2$ instead classifies line subbundles of the trivial $3$-dimensional real vector bundle $\mathbb{R}^3$ (and similarly $\mathbb{RP}^n$ classifies line subbundles of the trivial $n+1$-dimensional real vector bundle $\mathbb{R}^{n+1}$).
So what the calculation of $\pi_2(\mathbb{RP}^2)$ vs. $\pi_2(\mathbb{RP}^n), n \ge 3$ reveals is that there are a $\mathbb{Z}$'s worth of real line subbundles of $\mathbb{R}^3$ on $S^2$ but that these bundles all become isomorphic after adding an additional copy of $\mathbb{R}$. With a little effort it should be possible to write down these line subbundles and the resulting isomorphisms explicitly. Probably the normal bundle of the embedding $S^2 \to \mathbb{R}^3$ is a generator.
If $X$ is any compact Hausdorff space then every vector bundle on it is a direct summand of a trivial bundle, so for line bundles what this tells us is that every line bundle is represented by a map $X \to \mathbb{RP}^n$ for some $n$ (but isomorphisms of line bundles may require passing to a larger value of $n$ to define). This connects up nicely with the picture where $\mathbb{RP}^{\infty}$ is the filtered colimit of the $\mathbb{RP}^n$'s, because a map $X \to \mathbb{RP}^{\infty}$ has image contained in some $\mathbb{RP}^n$ by compactness.
