I cannot determine why this does not compile unless I remove amsthm which I normally include, though I don't exactly know why.
\documentclass{article}
\usepackage{amsthm}
\usepackage{mathtools, thmtools}
\usepackage[capitalize]{cleveref}
\declaretheorem[style=plain,numberwithin=section,name=Theorem]{theorem}
\declaretheorem[style=plain,sibling=theorem,name=Lemma]{lemma}
\usepackage{hyperref}
\begin{document}
\begin{theorem}
This is a test.
\end{theorem}
\begin{lemma}
This is a test.
\end{lemma}
\end{document}
cleverefpackage is one of the few packages which should be loaded afterhyperref– samcarter_is_at_topanswers.xyz Oct 25 '18 at 21:59cleverefmust be loaded afterhyperref!". After doing that, the code compiles. Do you read your.log? – Werner Oct 25 '18 at 21:59