Measurements of the inclusive and differential fiducial cross sections of the Higgs boson are presented, using the τ lepton decay channel. The differential cross sections are measured as functions of the Higgs boson transverse momentum, jet multiplicity, and transverse momentum of the leading jet in the event, if any. The analysis is performed using proton-proton collision data collected with the CMS detector at the LHC at a center-of-mass energy of 13 TeV and corresponding to an integrated luminosity of 138 fb-1. These are the first differential measurements of the Higgs boson cross section in the final state of two τ leptons. In final states with a large jet multiplicity or with a Lorentz-boosted Higgs boson, these measurements constitute a significant improvement over measurements performed in other final states.