When you start a new, blank document in Office Online, your document gets a name like Document4 or Presentation2. To rename the document while you’re editing it, click on the file name near the top of the browser window, and type the name you want.
If nothing happens when you type, check to make sure you’re in Editing view (on the View tab, click Editing View).
You won’t be able to rename a file if other people are working on it at the same time you are. Wait until you’re the only one in the document, and then rename it.