Recurrent novae are repeating thermonuclear explosions in the outer layers of white dwarfs, due to the accretion of fresh material from a binary companion. The shock generated when ejected material slams into the companion star's wind can accelerate particles. We report very-high-energy (VHE; [Formula: see text]) gamma rays from the recurrent nova RS Ophiuchi, up to 1 month after its 2021 outburst, observed using the High Energy Stereoscopic System (H.E.S.S.). The temporal profile of VHE emission is similar to that of lower-energy giga-electron volt emission, indicating a common origin, with a 2-day delay in peak flux. These observations constrain models of time-dependent particle energization, favoring a hadronic emission scenario over the leptonic alternative. Shocks in dense winds provide favorable environments for efficient acceleration of cosmic rays to very high energies