In obsidian: use the <sup> HTML tag. In Anki click the button or use the [Ctrl + Shift + =] keyboard shortcut, or enable source view and add the <sup> there.