Suppression of the $J/\psi$ nuclear-modification factor has been seen as a trademark signature of final-state effects in large collision systems for decades. In small systems, the nuclear modification was attributed to cold-nuclear-matter effects until the observation of strong differential suppression of the $\psi(2S)$ state in $p/d$ $+$ $A$ collisions suggested the presence of final-state effects. Results of $J/\psi$ and $\psi(2S)$ measurements in the dimuon decay channel are presented here for $p$ $+$ $p$, $p$ $+$Al, and $p$ $+$Au collision systems at $\sqrt{s_{_{NN}}}=200$ GeV. The results are predominantly shown in the form of the nuclear-modification factor, $R_{pA}$, the ratio of the $\psi(2S)$ invariant yield per nucleon-nucleon collision in collisions of proton on target nucleus to that in $p$ $+$ $p$ collisions. Measurements of the $J/\psi$ and $\psi(2S)$ nuclear-modification factor are compared with shadowing and transport-model predictions, as well as to complementary measurements at Large-Hadron-Collider energies.