Let $\mathscr{F}^{\bullet}$ be a complex of sheaves of abelian groups on a scheme $X$, e.g., $\Omega_X^0\to\Omega_X^1\to\Omega_X^2\to...$. In my mind there are three ways of definition the cohomology.
Just take the global section, it forms a chain complex of abelian groups. Then we can just compute the usual cohomology.
We can define the cohomology sheaves $\mathscr{H}^i:=\mathrm{ker}(d^i)/\mathrm{im}(d^{i-1})$ as a quotient sheaf. Then take its global section.
Find an injective resolution of $\mathscr{F}^{\bullet}\to I^\bullet$. Then take global section on $I^\bullet$ and compute the cohomology of these chain of abelian groups.
Are they actually the same? Why do we take the the last one to define the de Rham cohomology?