The strong coupling constant $alpha_s(M_Z)$ is determined from inclusive jet and dijet cross sections in neutral-current deep-inelastic $ep$ scattering (DIS) measured at HERA by the H1 collaboration using next-to-next-to-leading order (NNLO) QCD predictions. The dependence of the NNLO predictions and of the resulting value of $alpha_s(M_Z)$ at the $Z$-boson mass $m_Z$ are studied as a function of the choice of the renormalisation and factorisation scales. Using inclusive jet and dijet data together, the strong coupling constant is determined to be $alpha_s(M_Z)=0.1166,(19)_{rm exp},(24)_{rm th}$. Complementary, $alpha_s(M_Z)$ is determined together with parton distribution functions of the proton (PDFs) from jet and inclusive DIS data measured by the H1 experiment. The value $alpha_s(M_Z)=0.1147,(25)_{rm tot}$ obtained is consistent with the determination from jet data alone. The impact of the jet data on the PDFs is studied. The running of the strong coupling is tested at different values of the renormalisation scale and the results are found to be in agreement with expectations.