app/design/frontend/Vendor/Customtheme/Magento_Theme/layout/default.xml
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="register-link" remove="true" />
<referenceBlock name="authorization-link" remove="true" />
<referenceBlock name="wish-list-link" remove="true" />
<referenceBlock name="my-account-link" remove="true" />
<referenceBlock name="top.links" remove="true" />
<referenceBlock name="header.panel.wrapper" remove="true" />
<referenceBlock name="header.container" remove="true" />
<referenceContainer name="page.wrapper">
<container name="custom.header" htmlClass="headerSection" htmlTag="div" before="main.content">
<block class="Magento\Framework\View\Element\Template" name="navigation.sections" before="-" template="Magento_Theme::html/customheader.phtml">
</block>
</container>
</referenceContainer>
</body>
</page>
app/design/frontend/Vendor/Customtheme/Magento_Theme/templates/html/customheader.phtml
<h1>Custom Header Content here</h1>
It's giving me this error
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'Magento_Theme::html/customheader.phtml' in module: '' block's name: 'navigation.sections'