  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
$\sqrt{s}=13$ TeV proton-proton collision data with 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 is found
to be 10.4 pb (8.6 pb). The observed (expected) measured cross-section for this
process is $5.2 \pm 3.0 ~\text{pb}$ ($2.9 \pm 2.8 ~\text{pb}$).
