Use the open operator to add a new line above or below your cursor and then enter insert mode on that line.
Whenever you use the open operator to create a new line, the new line will automatically match the indentation level of the lines around it.
Also note that you can use the open operator from anywhere within a line. You do not need to be at the end or beginning of a line to use it.