A search for decays to invisible particles of Higgs bosons produced in association with a top-antitop quark pair or a vector boson, which both decay to a fully hadronic final state, has been performed using proton-proton collision data collected at $\sqrt{s}$ = 13 TeV by the CMS experiment at the LHC, corresponding to an integrated luminosity of 138 fb$^{-1}$. The 95% confidence level upper limit set on the branching fraction of the 125 GeV Higgs boson to invisible particles, $\mathcal{B}$(H $\to$ inv), is 0.54 (0.39 expected), assuming standard model production cross sections. The results of this analysis are combined with previous $\mathcal{B}$(H $\to$ inv) searches carried out at $\sqrt{s}$ = 7, 8, and 13 TeV in complementary production modes. The combined upper limit at 95% confidence level on $\mathcal{B}$(H $\to$ inv) is 0.15 (0.08 expected).