Let $(X, \mathcal{O}_{X})$ be a ringed-space. Let $\mathcal{F}$ be a sheaf of $\mathcal{O}_{X}$-modules. For any section $s \in \Gamma(X, \mathcal{F})$, we define a morphism, $$ \mathcal{O}_{X} \longrightarrow \mathcal{F} $$ by $f \mapsto f \cdot s|_{U}$ for every open set $U \subseteq X$ with $f \in \mathcal{O}_{X}(U)$. Conversely, any morphism of sheaves $\varphi: \mathcal{O}_{X} \rightarrow X$ as above can be realized in this way by choosing the section $\varphi(1)$. Now if $I$ is any indexing set, any morphism $$ \phi: \mathcal{O}_{X}^{(I)} \longrightarrow \mathcal{F} $$ is determined by a component family, $$ \{ \varphi_{i}: \mathcal{O}_{X} \longrightarrow \mathcal{F} \}_{i \in I} $$ In turn, as described above, we then get sections $s_{i} = \varphi_{i}(1)$ which determine each of these morphisms. But since $\mathcal{O}_{X}$ is a generator in the category of sheaves of $\mathcal{O}_{X}$-modules, we can always find an index set $I$ so that there is a surjection, $$ \phi: \mathcal{O}_{X}^{(I)} \longrightarrow \mathcal{F} $$ as above. But then we could choose out sections like we just did and suddenly we have that $\mathcal{F}$ is generated by those global sections.
Where is the flaw in this reasoning? I know it is obviously wrong because we could find $\mathcal{F}$ having no non-trivial global sections at all, despite being a non-zero sheaf.
As suggested in the comment by Lord Shark the Unknown, $ \mathcal{O}_X $ is not a generator of the category of sheaves of $ \mathcal{O}_X $-modules though it has a generator, namely $ \bigoplus_{U: \text{ open}} \mathcal{O}_U $.