In its default configuration, Hugo removes HTML comments from the published page when you build your site with the --minify
flag.
With v0.137.1 and later, use the the comment shortcode to add comments to the body of your Markdown. You can learn more about this change here.