The prompt and non-prompt production cross-sections for $\psi(2S)$ mesons are measured using 2.1 fb$^{-1}$ of $pp$ collision data at a centre-of-mass energy of 7 TeV recorded by the ATLAS experiment at the LHC. The measurement exploits the $\psi(2S)\to J/\psi(\to\mu^+\mu^-)\pi^+\pi^-$ decay mode, and probes $\psi(2S)$ mesons with transverse momenta in the range $10\leq p_T<100$ GeV and rapidity $|y|<2.0$. The results are compared to other measurements of $\psi(2S)$ production at the LHC and to various theoretical models for prompt and non-prompt quarkonium production.
Measurements of the differential production cross-sections of prompt and non-prompt $J/\psi$ and $\psi(2$S$)$ mesons with transverse momenta between 8 and 360 GeV and rapidity in the range $|y|<2$ are reported. Furthermore, measurements of the non-prompt fractions of $J/\psi$ and $\psi(2$S$)$, and the prompt and non-prompt $\psi(2$S$)$-to-$J/\psi$ production ratios, are presented. The analysis is performed using 140 fb$^{-1}$ of $\sqrt{s}=13$ TeV $pp$ collision data recorded by the ATLAS detector at the LHC during the years 2015-2018.