Superscript in Word
To superscript Word, type the word in the usual way. For example m2. Select the character or characters you want to change, and press CTRL and +. Note that this is the plus symbol to the left of the Enter / Enter / Enter key on the standard keyboard, not the number one. It will look like this:

Access from menus
Depending on your version of Word and your Windows or keyboard language, the key combinations may not work. In that case the most practical is to use the menus.
Write the word that contains the subscript or superscript in the standard way, and highlight the letter you want to change. In old versions of Word go to the Format menu , and go to Font. In modern ones, look for the tool ribbon, go to the Home, Format and Font tab.
Inside Font are the Subscript and Superscript icons. Press one or the other as you need:

Superscripts are exponents or powers of numbers or alphabets. Like 12. Bellow are the step by step explanation for the same:
First Way:
1. Write the base element and the superscript element together.
2. Select the element that will be the superscript.
3. Go to the Format tab.
4. Select Text and click Superscript.

1. Select the element that will be the superscript.
2. Then press the CTRL with + key
To remove the superscript, just select the superscript element and press the CTRL with + key.
To Apply Subscript in Google Doc follow these steps: https://www.techngeek4u.com/2020/10/subscripts-in-google-docs.html