  Using a data sample of $\sqrt{s} =$ 13 TeV proton-proton collisions collected
by the CMS experiment at the LHC in 2017 and 2018 with an integrated luminosity
of 103 fb$^{-1}$, the B$^0$ $\to$ $\psi$(2S)K$^0_\mathrm{S}$ and
B$^0_\mathrm{S}$ $\to$ $\psi$(2S)K$^0_\mathrm{S}\pi^+\pi^-$ decays are observed
with significances exceeding 5 standard deviations. The resulting branching
fraction ratios, measured for the first time, correspond to
$\mathcal{B}$(B$^0_\mathrm{S}$ $\to$ $\psi$(2S)K$^0_\mathrm{S}$) /
$\mathcal{B}$(B$^0$ $\to$ $\psi$(2S)K$^0_\mathrm{S}$) = (3.33 $\pm$ 0.69 (stat)
$\pm$ 0.11 (syst) $\pm$ 0.34 ($f_\mathrm{s} / f_\mathrm{d}$)) $\times$
10$^{-2}$ and $\mathcal{B}$(B$^0$ $\to$ $\psi$(2S)K$^0_\mathrm{S}\pi^+\pi^-$) /
$\mathcal{B}$(B$^0$ $\to$ $\psi$(2S)K$^0_\mathrm{S}$) = 0.480 $\pm$ 0.013
(stat) $\pm$ 0.032 (syst), where the last uncertainty in the first ratio is
related to the uncertainty in the ratio of production cross sections of
B$^0_\mathrm{s}$ and B$^0$ mesons, $f_\mathrm{s} / f_\mathrm{d}$.
