We describe the production of heavy quarkonia in p A collisions within the dipole approach by assuming the dominance of the perturbative color-singlet mechanism (CSM) in the pT-integrated cross section. Although accounting for a nonzero heavy Q -Q ¯ separation is a higher-twist correction that is usually neglected, we found it to be the dominant source of nuclear effects, significantly exceeding the effects of leading-twist gluon shadowing and energy loss. Moreover, this contribution turns out to be the most reliably predicted, relying on the precise measurements of the dipole cross section at the Hadron-Electron Ring Accelerator (HERA) at DESY. The nuclear suppression of quarkonia has been anticipated to become stronger with energy because the dipole cross section steeply rises. However, the measured nuclear effects remain essentially unchanged within the energy range from that of the BNL Relativistic Heavy Ion Collider (RHIC) to that of the Large Hadron Collider (LHC). A production mechanism is proposed that enhances the charmonium yield. Nuclear effects for the production of J /ψ , ψ (2 S ) , Υ (1 S ) , and Υ (2 S ) are calculated and are in agreement with data from RHIC and LHC. The dipole description offers a unique explanation for the observed significant nuclear suppression of the ψ (2 S ) -to-J /ψ ratio, which is related to the nontrivial features of the ψ (2 S ) wave function.