There is a statement as follows:
For $E\to M$ a holomorphic vector bundle and $V\subset M$ a subvariety, the kernel of the restriction map $\mathcal{O}_M(E)\to \mathcal{O}_V(E)$ is the sheaf of sections of a vector bundle if and only if $V$ is of codimension 1 in $M$.
I think the kernel is the sections that vanish on $V$. How does the dimension of $V$ come into the picture? Hope someone could help. Thanks!
Let $I_V$ be the ideal sheaf of $V$, there is an exact sequence
$$0\to I_V\to \mathcal{O}_M\to \mathcal{O}_V\to 0.$$
It is an exercise to show that the ideal sheaf $I_V$ is locally free if and only if $V$ is of codimension one. Now tensor the sequence with the vector bundle $E$, then you will get the result.