A search for a charged Higgs boson, , produced in top-quark decays, , is presented. The search targets decays into a bottom and a charm quark, . The analysis focuses on data enriched in top-quark pair production, where one top quark decays into a leptonically decaying boson and a bottom quark, and the other top quark decays into a charged Higgs boson and a bottom quark. This topology leads to a lepton-plus-jets final state, characterised by an isolated electron or muon and at least four jets. The search exploits the high multiplicity of jets containing -hadrons, and deploys a neural network classifier that uses the kinematic differences between the signal and the background. The search uses a dataset of proton-proton collisions collected at a center-of-mass energy TeV between 2015 and 2018 with the ATLAS detector at CERN's Large Hadron Collider, amounting to an integrated luminosity of 139~fb. Observed (expected) 95% confidence-level upper limits between 0.15% (0.09%) and 0.42% (0.25%) are derived for the product of branching fractions for charged Higgs boson masses between 60 and 160 GeV.