I've defined a theorem-like environment called ex for exercises for my students. Some of them are taken from other authors and I'd like to give them credit. In order to do that, I was thinking of marking the exercises with $\star$ or $\dag$ superscripts to the exercise number. I've done so through
\documentclass[a4paper]{article}
\usepackage{amsthm}
\newtheorem{ex}{Exercise}[subsection]
\begin{document}
\begin{ex}\textsuperscript{$\star$} Question
\end{ex}
\end{document}
However, the superscript appears at a distance of the number itself and looks odd because of the space inserted after the exercise number.

\newtheoremstylecontrols whatever is put after the number. Write whatever you want there. – campa Oct 20 '21 at 12:12\newtheoremalways uses the last\theoremstyle. – campa Oct 20 '21 at 13:00\newtheoremwhich uses some helper macro, and the user environments which define this macro to whatever symbol you want. However, this is beyond the scope of this question as it stands. You might want to ask a new question, but please provide all information. – campa Oct 20 '21 at 13:16