  We point out that the accidental $U(1)_{B-L}$ symmetry can arise from a
finite modular symmetry $\Gamma_N$ in the type-I seesaw. The finite modular
symmetry is spontaneously broken in such a way that the residual
$\mathbb{Z}^T_N$ discrete symmetry, associated with the $T$-transformation
which shifts the modulus $\tau \to \tau+ 1$, remains unbroken. This discrete
$\mathbb{Z}^T_N$ symmetry mimics $U(1)_{B-L}$, and hence the majoron appears as
a pseudo Nambu-Goldstone boson of $U(1)_{B-L}$. Without introducing additional
interactions, the modulus $\tau$ can be stabilized by the Coleman-Weinberg (CW)
potential given by the Majorana mass terms of the right-handed neutrinos. We
study cosmological implications of the majoron, with particular interests in
the dark matter and dark radiation, where the latter may alleviate the Hubble
tension. We also find that the CW potential can have a wide range of nearly
exponential shape which prevents $\tau$ from overshooting, and makes the amount
of dark radiation not too large.
