\documentclass{article}
\usepackage[bookmarksopen=true]{hyperref}
\usepackage{glossaries-extra}
\newglossaryentry{ex}{name={sample},description={an example}}
\begin{document}
    \section{\glsfmtfirstpl{ex}}
\end{document}
