A couple of codes I find helpful.
If you want to type degrees, as in 0°C, type the 0, hold down the Alt key, and type 0176 . then the C.
To type the degree symbol on a Mac, press Option + Shift + 8
When typing an area, as in 25sq m., type the number and the scale (m, ft, km, etc) then hold down the Alt key and type 0178. The result is 25m². (If you copy a text with the superscript 2 in it and paste to these forums, you will get number, m2. I encounter that when creating aircraft profiles.)
To type the squared symbol (²) on a Mac, you can open the Character Viewer by pressing Control + Command + Space, then search for "superscript" and double-click on the number 2. Alternatively, you can go to the Edit menu, select "Emoji & Symbols," and find the superscript 2 there.
For a cubed number, use Alt and 0179. 3 m³.
To type the cubed symbol (³) on a Mac, use the keyboard shortcut "Option + Shift + 3." This will directly insert the cubed exponent into your text.