  The ratio of production cross-sections of $\psi(2S)$ over $J/\psi$ mesons as
a function of charged-particle multiplicity in proton-proton collisions at a
centre-of-mass energy $\sqrt{s}=13$ TeV is measured with a data sample
collected by the LHCb detector, corresponding to an integrated luminosity of
658 pb$^{-1}$. The ratio is measured for both prompt and non-prompt $\psi(2S)$
and $J/\psi$ mesons. When there is an overlap between the rapidity ranges over
which multiplicity and charmonia production are measured, a
multiplicity-dependent modification of the ratio is observed for prompt mesons.
No significant multiplicity dependence is found when the ranges do not overlap.
For non-prompt production, the $\psi(2S)-to-J/\psi$ production ratio is roughly
independent of multiplicity irrespective of the rapidity range over which the
multiplicity is measured.
  The results are compared to predictions of the co-mover model and agree well
except in the low multiplicity region. The ratio of production cross-sections
of $\psi(2S)$ over $J/\psi$ mesons are cross-checked with other measurements in
di-lepton channels and found to be compatible.
