Hello,
UPDATE: https://www.phpdocx.com/documentation/cookbook/working-with-headings
The headingLevel option sets the paragraph as heading (w:outlineLvl tag in the DOCX). If you want to apply also a heading style you need to set the pStyle option available in the same method.
Methods such as addHeading or embedHTML using heading tags (h1, h2, h3...) adds heading paragraphs with a custom paragraph style by default. The custom paragraph style applied can be the default ones included in phpdocx, generated from scratch using the API methods (https://www.phpdocx.com/documentation/practical/styles), or imported from a template.
Regards.