Use subscript for lower numbers: select the number, then click Format > Text > Subscript
Use the keyboard shortcut for subscript: Ctrl + , on Windows/Chromebook or Cmd + , on Mac
Use the toolbar if available: Format > Text > Subscript
Type formulas normally, then format only the numbers as subscript
Use superscript for charges or exponents: select the character, then click Format > Text > Superscript
Use the keyboard shortcut for superscript: Ctrl + . on Windows/Chromebook or Cmd + . on Mac
Insert special characters if needed: Insert > Special characters
Use equation mode for complex formulas: Insert > Equation
Copy and paste properly formatted chemical formulas from another document if needed
Use Google Docs add-ons for chemistry formatting if you need advanced chemical notation
