When creating a theme I can override the Magento header by placing files under
app/design/frontend/company/mytheme/Magento_Theme/layout/default.xml
and app/design/frontend/company/mytheme/Magento_Theme/templates/header.phtml
This works as expected. But I want to move my custom header into a module as I'd like to use it on other themes.
If I place the same files under the module directory (instead of them) the header doesn't update:
app/design/frontend/company/module/Magento_Theme/layout/default.xml
and app/design/frontend/company/module/Magento_Theme/templates/header.phtml
How can I make layout and template changes from within a module?