We supposedly proved that by the argument, that since $K$ is an $n$-dimensional $\mathbb{Q}$-vectorspace for a $n\in\mathbb{N}$ it follows that every ideal $I$ is finitley generated with at most $n$ generators.
My problem is, that I don't see how these two different kinds of generating should be related:
An ideal $I \subseteq \mathcal{O}_K$ is generated by a basis $\{w_1, ..., w_m\} \subseteq \mathcal{O}_K$ if $I = w_1 \mathcal{O}_K + ... + w_m \mathcal{O}_K$
The number field $K$ is generated by a basis $\{\alpha_1, ..., \alpha_n\} \subseteq K$ if $K = \alpha_1 \mathbb{Q} + ... + \alpha_n \mathbb{Q}$.
Furthermore, $\mathcal{O}_K$ seems to have a basis consisting of exactly $n$ elements. Of couse I also don't understand this, but it seems to fall in line with the question above.
It looks like you are confusing generators over $\mathcal O_K$ and generators over $\mathbb Z$.
If you proved that $\mathcal O_K$ has a $\mathbb Z$-basis consisting of exactly (or even at most) $n$ elements, then your claim about $I$ follows in a straightforward fashion: because $I$ is an ideal of $\mathcal O_K$, it is certainly an additive subgroup of $\mathcal O_K$ viewed as an abelian group. The fact about $\mathcal O_K$ tells us that it is a $\mathbb Z$-module (i.e. abelian group) of rank $n$, and so all of its $\mathbb Z$-submodules (subgroups) have rank at most $n$.
Edit based on comments below:
Generators of $I$ over $\mathbb Z$ are also generators over $\mathcal O_K$. To see this, say we have generators $\{w_1,...,w_m\}$ of $I$ over $\mathbb Z$ so that $$I = w_1 \mathbb Z + ... + w_m \mathbb Z$$
Since $I$ is an ideal, it is closed under multiplication by $\mathcal O_K$ and in fact $I\mathcal O_K = I$. So we can write $$I = \mathcal O_K I = \mathcal O_K(w_1 \mathbb Z + ... + w_m \mathbb Z) = w_1 \mathbb Z\mathcal O_K + ... + w_m \mathbb Z\mathcal O_K = w_1 \mathcal O_K + ... + w_m\mathcal O_K$$
Basically, when we pass from generators over $\mathbb Z$ to $\mathcal O_K$, we have at worst made our abelian group ($I$) bigger by allowing more coefficients in the linear combination, but because $I$ is also closed under multiplication from $\mathcal O_K$, it doesn't actually get larger.