A search for the production of a Higgs boson and one or more charm quarks, in which the Higgs boson decays into a photon pair, is presented. This search uses proton-proton collision data with a centre-of-mass energy of s = 13 TeV and an integrated luminosity of 140 fb−1 recorded by the ATLAS detector at the Large Hadron Collider. The analysis relies on the identification of charm-quark-containing jets, and adopts an approach based on Gaussian process regression to model the non-resonant di-photon background. The observed (expected, assuming the Standard Model signal) upper limit at the 95% confidence level on the cross-section for producing a Higgs boson and at least one charm-quark-containing jet that passes a fiducial selection is found to be 10.6 pb (8.8 pb). The observed (expected) measured cross-section for this process is 5.3 ± 3.2 pb (2.9 ± 3.1 pb).