Hello,
The createDocx method creates the file, but it doesn't download it. You can use the createDocxAndDownload method to generate and download the document; we recommend you to read the documentation available about this question: https://www.phpdocx.com/documentation/practical/creating-a-new-document.
Regards.