In general, projection operators do not form a vector space because $P$ is a projection if and only if $f(P)=0$ where $f(t) = t^2-t$. Indeed $P$ is a projection precisely when it acts as the identity on its image, and this is precisely the condition that $P^2 =P$, or $f(P)=0$. But clearly if $P_1$ and $P_2$ satisfy $f$, their sum will only if $P_1P_2+P_2P_1=0$, which will fail in general.
What is true, however, is that if $T$ is diagonalisable, then the algebra generated by $T$ inside $\text{Mat}_n(\mathbb R)$ -- that is, all operators of the form $p(T)$ where $p$ is a polynomial -- contains the projection operators to the eigenspaces of $T$. This is because $T$ is diagonalisable precisely when it satisfies $m(T)=0$ where $m(t)$ is the polynomial $(t-\lambda_1)\ldots(t-\lambda_k)$ where the $\{\lambda_i: 1\leq i \leq k\}$ is the set of eigenvalues of $T$.
Indeed if $T$ is diagonalisable, say $T=Q\Lambda Q^{-1}$ where $\Lambda = \text{diag}(\mu_1,\ldots,\mu_n)$ then since $m(T)=0$ if and only if
$$
0=Q^{-1}m(T)Q=m(Q^{-1}TQ)=m(\Lambda),
$$
it is enough to check $m(\Lambda)=\prod_{i=1}^k(\Lambda-\lambda_i.I)=0$. But all the matrices $\Lambda-\lambda_i.I$ are diagonal, and so the product is just given by the products of the diagonal entries, and for each $\mu_j$ there is some $i$ with $\lambda_i = \mu_j$, that is $\Lambda_{jj}-\lambda_i=0$, hence $m(\Lambda)=0$ as claimed.
On the other hand, if $T$ satisfies $m(T)=0$, then one can in fact show that $T$ is diagonalisable by showing that the projection operators lie in the algebra generated by $T$! The key is the fact that, since $m(t)$ has distinct roots, we can use
Lagrange interpolation: If $\{\lambda_1,\ldots,\lambda_k\}$ is a set of $k$ distinct numbers and we let $s_i(t) = \prod_{j\neq i}\frac{t-\lambda_j}{\lambda_i-\lambda_j}$, then if $f$ is any polynomial of degree at most $k-1$,
$$
f(t)= \sum_{i=1}^k f(\lambda_i)s_i.
$$
Proof: First note that $s_i(\lambda_j) = 1$ if $i=j$ and $0$ otherwise. It follows that $\{s_i(t): 1\leq i\leq k\}$ are linearly independent, since if $\sum_{i=1}^k a_is_i(t)=0$, then for any $j$, $1\leq j\leq k$, setting $t=\lambda_j$ we obtain $a_j=0$. But the space $\mathcal P_k$ of polynomials of degree at most $k-1$ has dimension $k$ (since it has a basis $\{1,t,\ldots,t^{k-1}\}$) and hence $\{s_i(t):1\leq i \leq k\}$ is a basis of $\mathcal P_k$. It follows that for any $f\in \mathcal P_k$ we may write $f = \sum_{i=1}^k c_is_i(t)$, but then taking $t=\lambda_j$ again we see that $c_j = f(\lambda_j)$ as required.
Now let $P_i = s_i(T)$. We claim $T$ is diagonalizable with the $P_i$ being the projection onto the $\lambda_i$-eigenspace of $T$. To see that $P_i$ is a projection map, notice that $(T-\lambda_i)P_i = (T-\lambda_i)s_i(T)=0$, since $(t-\lambda_i).s_i(t)$ is a scalar multiple of $m(T)$. Thus $\text{im}(P_i)\subseteq E_{\lambda_i}$. But if $v \in E_{\lambda_i}$ so that $T(v)=\lambda_i.v$, then $s_i(T)(v) = s_i(\lambda_i).v=1.v$, hence $P_i(v)=v$ for all $v \in E_{\lambda_i}$. It follows that $P_i^2=P_i$ and $\text{im}(P_i)=E_{\lambda_i}$, that is, $P_i$ is a projection map with image the $E_{\lambda_i}$.
Finally, since $I_n = \sum_{i=1}^k s_i(T)=\sum_{i=1}^k P_i$, for any $v \in \mathbb R^n$, $v =\sum_{i=1}^k P_i(v)$ it follows that $\mathbb R^n = \sum_{i=1}^k E_{\lambda_i}$ and since eigenspaces always form a direct sum, $\mathbb R^n = \bigoplus_{i=1}^k E_{\lambda_i}$ so that $T$ is diagonalizable as claimed.