[proofplan]
The locally finite hypersurface data define an effective Cartier divisor $D$ by taking finite products of local defining equations with the prescribed multiplicities. The exponential sheaf sequence, together with Cartan's Theorem B and the assumption $H^2(X,\mathbb{Z})=0$, implies $H^1(X,\mathcal{O}^*)=0$. The divisor exact sequence then forces every Cartier divisor on $X$, in particular $D$, to be principal. Since $D$ is effective, its global meromorphic generator has no poles, so it is a holomorphic function whose zero divisor is exactly $D$.
[/proofplan]
[step:Build the effective Cartier divisor from the locally finite hypersurface family]
Write $\mathcal{O}=\mathcal{O}_X$ for the sheaf of holomorphic functions on $X$, $\mathcal{O}^*$ for the sheaf of nowhere-vanishing holomorphic functions, and $\mathcal{M}^*$ for the sheaf of nonzero meromorphic functions. By local finiteness and the Cartier property of analytic hypersurfaces on complex manifolds, choose an open cover $\mathfrak{U}=\{U_a\}_{a\in A}$ such that the set
\begin{align*}
J_a:=\{j\in J:V_j\cap U_a\neq \varnothing\}
\end{align*}
is finite and, for every $j\in J_a$, there is a holomorphic map
\begin{align*}
h_{j,a}:U_a&\to \mathbb{C}
\end{align*}
whose zero divisor is $V_j\cap U_a$ with multiplicity one.
For each $a\in A$, define the holomorphic map
\begin{align*}
g_a:U_a&\to \mathbb{C}\\
x&\mapsto \prod_{j\in J_a}h_{j,a}(x)^{m_j},
\end{align*}
where the empty product is the constant holomorphic map $1:U_a\to\mathbb{C}$. Let $\operatorname{div}_0(g_a)$ denote the zero divisor of $g_a$. Then
\begin{align*}
\operatorname{div}_0(g_a)=\sum_{j\in J_a}m_j\,(V_j\cap U_a).
\end{align*}
For $a,b\in A$, write $U_{ab}:=U_a\cap U_b$. At every point of $U_{ab}$, the local zero divisors of $g_a$ and $g_b$ agree, because both record exactly the hypersurfaces $V_j$ passing through that point with multiplicity $m_j$. Hence there is a nowhere-vanishing holomorphic map
\begin{align*}
u_{ab}:U_{ab}&\to \mathbb{C}^*
\end{align*}
such that $g_a=u_{ab}g_b$ on $U_{ab}$. On triple overlaps $U_{abc}:=U_a\cap U_b\cap U_c$, these maps satisfy $u_{ab}u_{bc}=u_{ac}$. Thus the local equations $\{g_a\}_{a\in A}$ define a global effective Cartier divisor
\begin{align*}
D\in H^0(X,\mathcal{M}^*/\mathcal{O}^*)
\end{align*}
equal to the locally finite sum $\sum_{j\in J}m_jV_j$.
[guided]
We first convert the geometric data into the sheaf-theoretic object controlled by cohomology. Let $\mathcal{O}=\mathcal{O}_X$ be the sheaf of holomorphic functions on $X$, let $\mathcal{O}^*$ be the sheaf of nowhere-vanishing holomorphic functions, and let $\mathcal{M}^*$ be the sheaf of nonzero meromorphic functions.
The family $\{V_j\}_{j\in J}$ is locally finite, so around each point of $X$ only finitely many hypersurfaces appear. Also, by the Cartier property of analytic hypersurfaces on complex manifolds, each analytic hypersurface is locally defined by one holomorphic equation. Refining the local neighborhoods, choose an open cover $\mathfrak{U}=\{U_a\}_{a\in A}$ such that
\begin{align*}
J_a:=\{j\in J:V_j\cap U_a\neq \varnothing\}
\end{align*}
is finite for every $a\in A$, and such that for every $j\in J_a$ there is a holomorphic map
\begin{align*}
h_{j,a}:U_a&\to \mathbb{C}
\end{align*}
whose zero divisor is $V_j\cap U_a$ with multiplicity one.
The finiteness of $J_a$ is the point of the local finiteness hypothesis: it allows us to multiply the local equations. Define
\begin{align*}
g_a:U_a&\to \mathbb{C}\\
x&\mapsto \prod_{j\in J_a}h_{j,a}(x)^{m_j}.
\end{align*}
If $J_a=\varnothing$, this product is the constant holomorphic map $1:U_a\to\mathbb{C}$. Since each $h_{j,a}$ vanishes to order one along $V_j\cap U_a$, the zero divisor of $g_a$ is
\begin{align*}
\operatorname{div}_0(g_a)=\sum_{j\in J_a}m_j\,(V_j\cap U_a).
\end{align*}
Now we check that these local equations are compatible on overlaps. For $a,b\in A$, put $U_{ab}:=U_a\cap U_b$. At a point $x\in U_{ab}$, any hypersurface $V_j$ not passing through $x$ contributes a unit in the local ring $\mathcal{O}_{X,x}$, while each hypersurface $V_j$ passing through $x$ contributes the same multiplicity $m_j$ to both $g_a$ and $g_b$. Therefore $g_a$ and $g_b$ have the same local divisor at every point of $U_{ab}$. Equivalently, their quotient is a holomorphic unit, so there is a nowhere-vanishing holomorphic map
\begin{align*}
u_{ab}:U_{ab}&\to \mathbb{C}^*
\end{align*}
such that $g_a=u_{ab}g_b$ on $U_{ab}$.
On a triple overlap $U_{abc}:=U_a\cap U_b\cap U_c$, the identities $g_a=u_{ab}g_b$ and $g_b=u_{bc}g_c$ give $g_a=u_{ab}u_{bc}g_c$, while $g_a=u_{ac}g_c$. Since these are identities of local equations and the quotient is a unit, we get $u_{ab}u_{bc}=u_{ac}$. Hence the local equations $\{g_a\}_{a\in A}$ define a global effective Cartier divisor
\begin{align*}
D\in H^0(X,\mathcal{M}^*/\mathcal{O}^*)
\end{align*}
and this divisor is precisely the locally finite sum $\sum_{j\in J}m_jV_j$.
[/guided]
[/step]
[step:Use the exponential sequence to prove $H^1(X,\mathcal{O}^*)=0$]
Let $\underline{\mathbb{Z}}$ denote the constant sheaf on $X$. The Exponential Sheaf Sequence is the exact sequence
\begin{align*}
0\longrightarrow \underline{\mathbb{Z}}\xrightarrow{\iota}\mathcal{O}\xrightarrow{\operatorname{Exp}}\mathcal{O}^*\longrightarrow 1,
\end{align*}
where $\iota$ sends a locally constant integer-valued function $n$ to $2\pi i n$, and $\operatorname{Exp}$ sends $g\in\mathcal{O}(U)$ to the holomorphic map
\begin{align*}
\operatorname{Exp}(g):U&\to \mathbb{C}^*\\
x&\mapsto e^{g(x)}.
\end{align*}
The Long Exact Sequence in Sheaf Cohomology gives the segment
\begin{align*}
H^1(X,\mathcal{O})\xrightarrow{\operatorname{Exp}_*}H^1(X,\mathcal{O}^*)\xrightarrow{c_1}H^2(X,\underline{\mathbb{Z}}).
\end{align*}
The structure sheaf $\mathcal{O}$ is coherent by the Oka Coherence Theorem. Since $X$ is Stein, Cartan's Theorem B gives
\begin{align*}
H^1(X,\mathcal{O})=0.
\end{align*}
Also, because complex manifolds are paracompact and locally contractible, the Comparison Theorem for Constant Sheaf Cohomology identifies $H^2(X,\underline{\mathbb{Z}})$ with the group denoted $H^2(X,\mathbb{Z})$ in the statement; by hypothesis,
\begin{align*}
H^2(X,\underline{\mathbb{Z}})=0.
\end{align*}
Exactness now implies
\begin{align*}
H^1(X,\mathcal{O}^*)=0.
\end{align*}
[guided]
The obstruction to solving the second Cousin problem lives in $H^1(X,\mathcal{O}^*)$, so we prove that this group vanishes. Let $\underline{\mathbb{Z}}$ be the constant sheaf on $X$. The Exponential Sheaf Sequence is
\begin{align*}
0\longrightarrow \underline{\mathbb{Z}}\xrightarrow{\iota}\mathcal{O}\xrightarrow{\operatorname{Exp}}\mathcal{O}^*\longrightarrow 1.
\end{align*}
Here $\iota$ sends a locally constant integer-valued function $n$ to the holomorphic function $2\pi i n$, and $\operatorname{Exp}$ sends each $g\in\mathcal{O}(U)$ to the nowhere-vanishing holomorphic map
\begin{align*}
\operatorname{Exp}(g):U&\to \mathbb{C}^*\\
x&\mapsto e^{g(x)}.
\end{align*}
Exactness means two things: the kernel of $\operatorname{Exp}$ is exactly $2\pi i\,\underline{\mathbb{Z}}$, and every nowhere-vanishing holomorphic function has a local holomorphic logarithm.
Applying the Long Exact Sequence in Sheaf Cohomology to this short exact sequence gives
\begin{align*}
H^1(X,\mathcal{O})\xrightarrow{\operatorname{Exp}_*}H^1(X,\mathcal{O}^*)\xrightarrow{c_1}H^2(X,\underline{\mathbb{Z}}),
\end{align*}
where $c_1$ is the connecting homomorphism, equivalently the first Chern class map for holomorphic line bundles.
We now verify the two endpoint vanishings. First, $\mathcal{O}$ is coherent by the Oka Coherence Theorem. Since $X$ is Stein, Cartan's Theorem B applies to the coherent sheaf $\mathcal{O}$ and gives
\begin{align*}
H^1(X,\mathcal{O})=0.
\end{align*}
Second, a complex manifold is paracompact and locally contractible, so the Comparison Theorem for Constant Sheaf Cohomology identifies $H^2(X,\underline{\mathbb{Z}})$ with the integral cohomology group $H^2(X,\mathbb{Z})$ appearing in the theorem statement. The hypothesis gives
\begin{align*}
H^2(X,\underline{\mathbb{Z}})=0.
\end{align*}
Let $\alpha\in H^1(X,\mathcal{O}^*)$. Since the target $H^2(X,\underline{\mathbb{Z}})$ is zero, $c_1(\alpha)$ is the straightforward class. Exactness then places $\alpha$ in the image of $\operatorname{Exp}_*$. But the source $H^1(X,\mathcal{O})$ is zero, so that image is straightforward. Hence every $\alpha$ is straightforward, and therefore
\begin{align*}
H^1(X,\mathcal{O}^*)=0.
\end{align*}
[/guided]
[/step]
[step:Lift the Cartier divisor to a global meromorphic function]
Let
\begin{align*}
q:\mathcal{M}^*&\to \mathcal{M}^*/\mathcal{O}^*
\end{align*}
be the quotient morphism of sheaves. The Exact Sequence of Cartier Divisors is
\begin{align*}
1\longrightarrow \mathcal{O}^*\longrightarrow \mathcal{M}^*\xrightarrow{q}\mathcal{M}^*/\mathcal{O}^*\longrightarrow 1.
\end{align*}
Its cohomology sequence begins
\begin{align*}
H^0(X,\mathcal{M}^*)\xrightarrow{q_*}H^0(X,\mathcal{M}^*/\mathcal{O}^*)\xrightarrow{\delta}H^1(X,\mathcal{O}^*),
\end{align*}
where $\delta$ is the connecting homomorphism. Since $H^1(X,\mathcal{O}^*)=0$, exactness gives $D\in\operatorname{im}(q_*)$. Hence there exists a global nonzero meromorphic function
\begin{align*}
F\in H^0(X,\mathcal{M}^*)=\mathcal{M}^*(X)
\end{align*}
such that $q_*(F)=D$.
For every $a\in A$, the equality $q(F|_{U_a})=q(g_a)$ means that there is a nowhere-vanishing holomorphic map
\begin{align*}
w_a:U_a&\to \mathbb{C}^*
\end{align*}
such that
\begin{align*}
F|_{U_a}=w_a g_a
\end{align*}
as meromorphic functions on $U_a$.
[guided]
The divisor $D$ is a global section of $\mathcal{M}^*/\mathcal{O}^*$. To say that $D$ is principal is to say that it comes from a single global meromorphic function. This is controlled by the quotient sequence
\begin{align*}
1\longrightarrow \mathcal{O}^*\longrightarrow \mathcal{M}^*\xrightarrow{q}\mathcal{M}^*/\mathcal{O}^*\longrightarrow 1,
\end{align*}
where
\begin{align*}
q:\mathcal{M}^*&\to \mathcal{M}^*/\mathcal{O}^*
\end{align*}
is the quotient morphism. This is the Exact Sequence of Cartier Divisors: two meromorphic local equations determine the same Cartier divisor exactly when they differ by a holomorphic unit.
The Long Exact Sequence in Sheaf Cohomology gives the segment
\begin{align*}
H^0(X,\mathcal{M}^*)\xrightarrow{q_*}H^0(X,\mathcal{M}^*/\mathcal{O}^*)\xrightarrow{\delta}H^1(X,\mathcal{O}^*),
\end{align*}
where $\delta$ is the connecting homomorphism. From the previous step,
\begin{align*}
H^1(X,\mathcal{O}^*)=0.
\end{align*}
Therefore $\delta(D)$ is the straightforward class. By exactness, $D$ lies in the image of $q_*$. Thus there exists
\begin{align*}
F\in H^0(X,\mathcal{M}^*)=\mathcal{M}^*(X)
\end{align*}
such that
\begin{align*}
q_*(F)=D.
\end{align*}
Now translate this equality back into local equations. On $U_a$, the divisor $D$ is represented by the local equation $g_a$. The equality $q_*(F)=D$ says that $F|_{U_a}$ and $g_a$ have the same image in $\mathcal{M}^*/\mathcal{O}^*$. Hence their quotient is a holomorphic unit. Equivalently, for every $a\in A$ there is a nowhere-vanishing holomorphic map
\begin{align*}
w_a:U_a&\to \mathbb{C}^*
\end{align*}
such that
\begin{align*}
F|_{U_a}=w_a g_a
\end{align*}
as meromorphic functions on $U_a$.
[/guided]
[/step]
[step:Use effectivity to turn the meromorphic lift into the required holomorphic function]
For each $a\in A$, define the holomorphic map
\begin{align*}
f_a:U_a&\to \mathbb{C}\\
x&\mapsto w_a(x)g_a(x).
\end{align*}
Since $f_a=F|_{U_a}$ as meromorphic functions, the maps $f_a$ and $f_b$ agree on every overlap $U_{ab}$. By the Sheaf Gluing Axiom, there is a unique holomorphic map
\begin{align*}
f:X&\to \mathbb{C}
\end{align*}
such that $f|_{U_a}=f_a$ for every $a\in A$.
Because each $w_a$ is nowhere vanishing, multiplication by $w_a$ does not change zero orders. Therefore, on $U_a$,
\begin{align*}
\operatorname{div}_0(f|_{U_a})=\operatorname{div}_0(g_a)=\sum_{j\in J_a}m_j\,(V_j\cap U_a).
\end{align*}
These local divisor equalities agree on overlaps and the sets $U_a$ cover $X$, so
\begin{align*}
\operatorname{div}_0(f)=D=\sum_{j\in J}m_jV_j.
\end{align*}
Thus $f\in\mathcal{O}(X)$ has zero set, counted with multiplicity, exactly $\bigcup_j m_jV_j$.
[guided]
The global function $F$ obtained above is meromorphic. The final point is that it has no poles. This is exactly where the effectivity of $D$ is used: the local representatives $g_a$ are holomorphic functions, not meromorphic functions with poles.
For each $a\in A$, define
\begin{align*}
f_a:U_a&\to \mathbb{C}\\
x&\mapsto w_a(x)g_a(x).
\end{align*}
The map $f_a$ is holomorphic because $w_a$ is holomorphic and nowhere vanishing, and $g_a$ is holomorphic by construction. Moreover,
\begin{align*}
f_a=F|_{U_a}
\end{align*}
as meromorphic functions on $U_a$. Therefore on an overlap $U_{ab}=U_a\cap U_b$, both $f_a$ and $f_b$ represent the same meromorphic function $F|_{U_{ab}}$. Since they are holomorphic representatives, they agree as holomorphic functions on $U_{ab}$.
The Sheaf Gluing Axiom for $\mathcal{O}$ now gives a unique holomorphic map
\begin{align*}
f:X&\to \mathbb{C}
\end{align*}
such that $f|_{U_a}=f_a$ for all $a\in A$. Thus the meromorphic function $F$ is represented everywhere by holomorphic functions, so it has no poles and belongs to $\mathcal{O}(X)$.
It remains to compute the zero multiplicities. On $U_a$ we have $f=w_ag_a$, and $w_a$ is nowhere zero. Multiplying by a holomorphic unit does not change the order of vanishing along any hypersurface. Hence
\begin{align*}
\operatorname{div}_0(f|_{U_a})=\operatorname{div}_0(g_a).
\end{align*}
By the definition of $g_a$,
\begin{align*}
\operatorname{div}_0(g_a)=\sum_{j\in J_a}m_j\,(V_j\cap U_a).
\end{align*}
These identities are compatible on overlaps because they all describe the same global divisor $D$. Since the sets $U_a$ cover $X$, we obtain
\begin{align*}
\operatorname{div}_0(f)=D=\sum_{j\in J}m_jV_j.
\end{align*}
Equivalently, the zero set of $f$, counted with multiplicity, is exactly $\bigcup_j m_jV_j$.
[/guided]
[/step]