To change a mega menu to a main menu with expanding levels in Shopify, you can follow these steps:
Go to your Shopify store’s dashboard
Navigate to the “Online Store” section
Select “Navigation” from the drop-down menu
Click on the menu you want to edit
Remove any third-level menu items
Customize the style and behavior of the menu using the theme’s liquid code.
Preview the changes and if satisfied, save and publish the changes to your live store.
Note: The exact steps for customizing the menu behavior may vary depending on your Shopify theme. You may need to consult the theme’s documentation or reach out to the theme support for specific instructions.