You can run arbitrary Emacs Lisp code with
eval-expression, by default bound to M-:
M-: runs the command eval-expression (found in global-map), which is
an interactive compiled Lisp function in ‘simple.el’.
When called interactively, read an Emacs Lisp expression and evaluate it.
So we need to give an Emacs Lisp expression to it.
(dotimes (i 10) (insert (format "%s.\n" (1+ i))))
dotimes to iterate the variable
i from 0 to 9. Each time through the loop, because you want to start at 1, insert one more than that number, plus a period and a newline.
Unfortunately, we can't simply use
(insert (1+ i) ".\n") because inserting the number directly treats that number as a character, and character #1 is not the number 1.