© 2022 CERN.A search for pairs of Higgs bosons produced via gluon and vector boson fusion is presented, focusing on the four b quark final state. The data sample consists of proton-proton collisions at a center-of-mass energy of 13 TeV, collected with the CMS detector at the LHC, and corresponds to an integrated luminosity of 138 fb-1. No deviation from the background-only hypothesis is observed. A 95% confidence level upper limit on the Higgs boson pair production cross section is observed at 3.9 times the standard model prediction for an expected value of 7.8. Constraints are also set on the modifiers of the Higgs field self-coupling, κλ, and of the coupling of two Higgs bosons to two vector bosons, κ2 V. The observed (expected) allowed intervals at the 95% confidence level are -2.3<κλ<9.4 (-5.0<κλ<12.0) and -0.1<κ2 V<2.2 (-0.4<κ2 V<2.5). These are the most stringent observed constraints to date on the HH production cross section and on the κ2 V coupling.