Google Docs can default to Microsoft Office formats
The Google Docs apps have a useful option for making new documents, worksheets and presentations that are Microsoft Office compatible.
Under Settings there’s the choice to make Word compatible .docx files as well as Google’s own document format.
There’s a choice in the same location in the other Google docs apps:
Google Docs – Create Word .docx files
Google Sheets – Create Excel .xlsx files
Google Slides – Create PowerPoint .pptx files
It’s off by default but, if it’s turned on then you’ll see another choice when making a new document.
Word .docx files (or .xlsx / .pptx) are not the default for new document, merely an added choice
When you save the document it will have the correct extension.
You can check the format of any document from the menu at top right of an open document.