A measurement of the production of vector bottomonium states, $\ensuremath{\Upsilon}(\text{1S})$, $\ensuremath{\Upsilon}(\text{2S})$, and $\ensuremath{\Upsilon}(\text{3S})$, in $\mathrm{Pb}+\mathrm{Pb}$ and $pp$ collisions at a center-of-mass energy per nucleon pair of 5.02 TeV is presented. The data correspond to integrated luminosities of $1.38\phantom{\rule{4pt}{0ex}}{\text{nb}}^{\ensuremath{-}1}$ of $\mathrm{Pb}+\mathrm{Pb}$ data collected in 2018, $0.44\phantom{\rule{4pt}{0ex}}{\text{nb}}^{\ensuremath{-}1}$ of $\mathrm{Pb}+\mathrm{Pb}$ data collected in 2015, and $0.26\phantom{\rule{4pt}{0ex}}{\text{fb}}^{\ensuremath{-}1}$ of $pp$ data collected in 2017 by the ATLAS detector at the Large Hadron Collider. The measurements are performed in the dimuon decay channel for transverse momentum ${p}_{\text{T}}^{\ensuremath{\mu}\ensuremath{\mu}}<30\phantom{\rule{0.16em}{0ex}}\mathrm{GeV}$, absolute rapidity $|{y}^{\ensuremath{\mu}\ensuremath{\mu}}|<1.5$, and $\mathrm{Pb}+\mathrm{Pb}$ event centrality 0--80%. The production rates of the three bottomonium states in $\mathrm{Pb}+\mathrm{Pb}$ collisions are compared with those in $pp$ collisions to extract the nuclear modification factors as functions of event centrality, ${p}_{\text{T}}^{\ensuremath{\mu}\ensuremath{\mu}}$, and $|{y}^{\ensuremath{\mu}\ensuremath{\mu}}|$. In addition, the suppression of the excited states relative to the ground state is studied. The results are compared with theoretical model calculations.