Hello,
When HTML is transformed to DOCX, default styles are applied that you can change using custom styles (CSS styles, MS Word styles).
To preserve the styles of a placeholder when replacing HTML in a template you need to use the stylesReplacementType option (https://www.phpdocx.com/api-documentation/templates/replace-variable-html-Word-document), but it's only available in HTML Extended for Premium licenses, the trial package doesn't include it. Using a not Premium license you need to set the styles to be applied in the HTML you are adding to the template. You can read this same information on https://www.phpdocx.com/documentation/introduction/html-extended-to-word-PHP (Replace placeholders keeping styles section).
Regards.