If you are working on a computer then you can hit enter right after the h1 and it will create the next line for you to place the h2 element.
If you are working on a phone, then you can look into this guide on how to make freecodecamp work for your phone.
If you are using a mobile device, the default keyboard does not always play well with the freeCodeCamp editor. I recommend you read the article on using a mobile device to view some tips - most importantly, check out the coding keyboards listed as they interface with the editor well.