The gluon fusion and vector-boson-fusion Higgs boson production modes are measured using proton--proton collisions in the decay channel. The Large Hadron Collider delivered proton-proton collisions at a centre-of-mass energy of 13 TeV between 2015 and 2018 which were recorded by the ATLAS detector, corresponding to an integrated luminosity of 139 fb. The products of the total gluon fusion and vector-boson-fusion cross sections times the branching fraction are respectively measured to be 12.4\pm1.5~\mathrm{pb} and 0.79\;^{+0.19}_{-0.16}~\mathrm{pb}, in agreement with Standard Model predictions. Higgs boson production is further characterised through measurements of Simplified Template Cross Sections in a total of 11 categories.