Consider the quotient $q(z) = \dfrac{f(z)}{g(z)}$. Since $f(0) = 0$ and $f$ is not constant, $0$ is an isolated zero of $f$, and hence of $q$ (since $g(0) = 1 \neq 0$). $q$ is an entire meromorphic function, non-constant since $0$ is an isolated zero.
In particular, $q$ is not bounded. $q \colon \mathbb{C} \to \widehat{\mathbb{C}}$ is a continuous map, hence $V = g(\mathbb{C})$ is connected. $V$ contains points with $\lvert w\rvert < 1$ and points with $\lvert w \rvert > 1$, hence it also contains points with $\lvert w\rvert = 1$. Let $z_0$ be a point with $\lvert q(z_0)\rvert = 1$. $q$ is an open mapping (since it is a non-constant meromorphic function), hence $q(D_1(z_0))$ contains a disk $D_\varepsilon(q(z_0))$. That disk contains infinitely many points with $\lvert w\rvert = 1$, hence there are infinitely many points $z \in D_1(z_0)$ with $\lvert q(z)\rvert = 1$. $\lvert q(z)\rvert = 1 \Rightarrow \lvert f(z)\rvert = \lvert g(z)\rvert$.