Manage from Custom module
If you want to changes the section from a custom module then
- create
customer_account_index.xml
at app/code/{Vendor}/{Module}/view/frontend/layout
- create a template
mycustominfo.phtml
at app/code/{Vendor}/{Module}/view/frontend/templates
Now, you add below code at customer_account_index.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="Magento\Customer\Block\Account\Dashboard\Info"
name="customer_account_dashboard_mycustominfo"
as="mycustominfo"
before ="customer_account_dashboard_info"
template="{Vendor}_{Module}::mycustominfo.phtml" cacheable="false"/>
</referenceContainer>
</body>
</page>
Manage from Theme module
If you want to changes the section from a custom theme then
- create
customer_account_index.xml
id not exits at app/design/{VendorTheme}/{ThemeName}/Magento_Customer/layout
- create a template
mycustominfo.phtml
at app/design/{VendorTheme}/{ThemeName}/Magento_Customer/templates
Now, you add below code at customer_account_index.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="Magento\Customer\Block\Account\Dashboard\Info"
name="customer_account_dashboard_mycustominfo"
as="mycustominfo"
before ="customer_account_dashboard_info"
template="Magento_Customer::mycustominfo.phtml" cacheable="false"/>
</referenceContainer>
</body>
</page>