How can I overidde html.html.twig in a module?
Overriding templates in the modules is not suggested because Drupals architecture doesn't really support multiple modules overriding same template.

However if you are still willing to do this, you have to simply add hook_theme() like this in your module file:

/**
 * Implements hook_theme().
 */
function modulename_theme() {
  return [
    // Normally theme suggestion templates are only picked up when they are in
    // themes. We explicitly define theme suggestions here so that these
    // templates in this module are picked.
    'html' =&gt; array(
    'render element' =&gt; 'elements',
    'base hook' =&gt; 'html',
  ];
}


Note: This will cause error messages in case you don't have the html.html.twig template available in the templates folder.