I know this question have already been answered many times. However I want to prove this using the De Rham cohomology of them, showing that they are not isomorphic and thus $S^2$ and $T^2$ are not diffeomorphic. I know that
$H_{d R}^r\left(\mathbb{S}^m, \mathbb{R}\right) \approx\left\{\begin{array}{ll}\mathbb{R} & \text { se } \quad r=0, r=m \\ \{0\} & \text {otherwise}\end{array}\right.$
which follows by the Poincarè Lemma. I'm not quite sure how to calculate the De Rham cohomology of the Torus though. Do I use that $T^2 = S^1 \times S^1$ somehow?
You do not need to work this hard to answer your question. You don't need to actually prove that $H^1_{\text{dR}}(T^2) \cong \Bbb R^2$. Since $H^1_{\text{dR}}(S^2) \cong \Bbb 0$, all you have to do is show that $H^1_{\text{dR}}(T^2)$ is nontrivial. Indeed, we can show it is at least two-dimensional.
Write $T^2 = S^1_1\times S^1_2$, with projections $\pi_i$ to the two factors. We know $H^1_{\text{dR}}(S^1)\cong\Bbb R$, with basis $d\theta$ (which is not exact, notwithstanding all appearances to the contrary). Now it is easy to check that $\pi_1^*(d\theta_1)$ and $\pi_2^*(d\theta_2)$ are closed forms on $T^2$; they cannot be exact (as you have closed curves over which their integrals are non-zero). Moreover, by the same logic, they are linearly independent (although we do not even need this here).