A search optimized for new heavy particles decaying to two b-quarks andproduced in association with additional b-quarks is reported. Thesensitivity is improved by b-tagging at least one lower-pT jet inaddition to the two highest-pT jets. The data used in this searchcorrespond to an integrated luminosity of 103 fb-1 collected with adedicated trijet trigger during the 2017 and 2018 pffisffi = 13 TeVproton-proton collision runs with the ATLAS detector at the LHC. Thesearch looks for resonant peaks in the b-tagged dijet invariant massspectrum over a smoothly falling background. The background is estimatedwith an innovative data-driven method based on orthonormal functions.The observed b-tagged dijet invariant mass spectrum is compatible withthe background-only hypothesis. Upper limits at 95\% confidence level ona heavy vector-boson production cross section times branching ratio to apair of b-quarks are derived.