HTML comments are stripped from plain HTML web pages on your sites when inspecting the HTML source in your web browser.
Some HTML comments are used as meta code and are required for some websites to work properly.
In these cases when HTML comments are removed it can cause a serious problem.
By default, there is no software on a cPanel server that would strip HTML comments. If you find that the HTML comments are removed from your site, this problem has been introduced by third-party software that is not related to cPanel.
The most common cause of this problem is the use of Cloudflare HTML minification which removes HTML comments.
There is a Cloudflare feature request to allow for the use of minification, but still pass through some HTML comments:
Cloudflare does not provide any documentation to explain how to disable minification, but they do mention that the option is in the "Speed" section in the following documentation:
You can reach out to their support if you are unable to disable the minification option on your own: