If you don't want to jump through hoops, Unicode has a set of superscript and subscript numbers (and a limited set of letters ...
Go to a website like Graphemica, which allows you to search for Unicode characters. Type in the symbol you want, such as “superscript two.” Copy the result (e.g., for superscript two ...