Using a nonperturbative functional renormalization-group approach to the two-dimensional quantum $\mathrm{O}(N$) model, we compute the low-frequency limit $\ensuremath{\omega}\ensuremath{\rightarrow}0$ of the zero-temperature conductivity in the vicinity of the quantum critical point. Our results are obtained from a derivative expansion to second order of a scale-dependent effective action in the presence of an external (i.e., nondynamical) non-Abelian gauge field. While in the disordered phase the conductivity tensor $\ensuremath{\sigma}(\ensuremath{\omega})$ is diagonal, in the ordered phase it is defined, when $N\ensuremath{\ge}3$, by two independent elements, ${\ensuremath{\sigma}}_{\mathrm{A}}(\ensuremath{\omega})$ and ${\ensuremath{\sigma}}_{\mathrm{B}}(\ensuremath{\omega})$, respectively associated to $\mathrm{SO}(N$) rotations which do and do not change the direction of the order parameter. For $N=2$, the conductivity in the ordered phase reduces to a single component ${\ensuremath{\sigma}}_{\mathrm{A}}(\ensuremath{\omega})$. We show that ${lim}_{\ensuremath{\omega}\ensuremath{\rightarrow}0}\ensuremath{\sigma}(\ensuremath{\omega},\ensuremath{\delta}){\ensuremath{\sigma}}_{\mathrm{A}}(\ensuremath{\omega},\ensuremath{-}\ensuremath{\delta})/{\ensuremath{\sigma}}_{q}^{2}$ is a universal number, which we compute as a function of $N$ ($\ensuremath{\delta}$ measures the distance to the quantum critical point, $q$ is the charge, and ${\ensuremath{\sigma}}_{q}={q}^{2}/h$ the quantum of conductance). On the other hand we argue that the ratio ${\ensuremath{\sigma}}_{\mathrm{B}}(\ensuremath{\omega}\ensuremath{\rightarrow}0)/{\ensuremath{\sigma}}_{q}$ is universal in the whole ordered phase, independent of $N$ and, when $N\ensuremath{\rightarrow}\ensuremath{\infty}$, equal to the universal conductivity ${\ensuremath{\sigma}}^{*}/{\ensuremath{\sigma}}_{q}$ at the quantum critical point.