\documentclass{article}
\usepackage[acronyms,nomain]{glossaries}
%\usepackage{glossaries-extra} % Add this line and \gls does not expand anymore
%\RestoreAcronyms % one-size-fits-all solution, not recommended
%\setabbreviationstyle[acronym]{long-short} % recommended
\newacronym{bug}{BUG}{back up generator}
\begin{document}
\gls{bug}?
\end{document}