  This paper presents direct searches for lepton flavour violation in Higgs
boson decays, $H\rightarrow e\tau$ and $H\rightarrow\mu\tau$, performed using
data collected with the ATLAS detector at the LHC. The searches are based on a
data sample of proton-proton collisions at a centre-of-mass energy $\sqrt{s} =
13$ TeV, corresponding to an integrated luminosity of 138 fb$^{-1}$. Leptonic
($\tau \rightarrow \ell \nu_\ell \nu_\tau$) and hadronic ($\tau \rightarrow $
hadrons $ \nu_\tau$) decays of the $\tau$-lepton are considered. Two background
estimation techniques are employed: the MC-template method, based on
data-corrected simulation samples, and the Symmetry method, based on exploiting
the symmetry between electrons and muons in the Standard Model backgrounds. No
significant excess of events is observed and the results are interpreted as
upper limits on lepton-flavour-violating branching ratios of the Higgs boson.
The observed (expected) upper limits set on the branching ratios at 95%
confidence level, $\mathcal{B}(H\rightarrow e\tau)<0.20\%$ (0.12%) and
$\mathcal{B}(H\rightarrow \mu\tau)<0.18\%$ (0.09%), are obtained with the
MC-template method from a simultaneous measurement of potential $H \rightarrow
e\tau$ and $H \rightarrow\mu\tau$ signals. The best-fit branching ratio
difference, $\mathcal{B}(H\rightarrow \mu\tau)- \mathcal{B}(H\rightarrow
e\tau)$, measured with the Symmetry method in the channel where the
$\tau$-lepton decays to leptons, is (0.25 $\pm$ 0.10)%, compatible with a value
of zero within 2.5$\sigma$.
