Hello,
The stable release of phpdocx doesn't include a method to compare two documents and generate a new document with the differences highlighted.
This task could be done with DOCX documents using DOCXPath methods (https://www.phpdocx.com/documentation/introduction/docxpath) and DOCXCustomizer (https://www.phpdocx.com/documentation/introduction/docxcustomizer), but it requires iterating and comparing XML contents. There's no direct function to accomplish it in the stable release of phpdocx.
Regards.