It is crucial to measure reaction cross sections relevant to the astrophysical $\ensuremath{\gamma}$ process so that theoretical reaction rates can be tested and validated with experimental data. The total cross sections for the $^{162}\mathrm{Er}(p,\ensuremath{\gamma})^{163}\mathrm{Tm}$ and the $^{162}\mathrm{Er}(p,n)^{162}\mathrm{Tm}$ reactions have been measured by the activation method in center-of-mass energies from 3.973 to 8.944 MeV and from 5.962 to 8.944 MeV, respectively. The nucleus $^{162}\mathrm{Er}$ is the heaviest $p$ nuclide to be measured by the activation method using $\ensuremath{\gamma}$-ray spectroscopy, so far. It is important to note that the energy range for the $(p,\ensuremath{\gamma})$ reaction measurement covers a large fraction of the astrophysically relevant energy region between 2.71 and 5.34 MeV. The targets were prepared by evaporating $28.2%$ isotopically enriched $^{162}\mathrm{Er}_{2}{\mathrm{O}}_{3}$ powder onto carbon backing foils, and bombarded with proton beams provided by the FN Tandem Accelerator at the University of Notre Dame. The reaction yields have been determined by the observed activity of produced radioactive isotopes, which was detected offline by a high-purity germanium detector. The results are presented and compared with calculations from two statistical model codes: non-smoker and talys.