The search function help your visitors quickly search for content on your website.
You may show or hide the search function by navigating to Appearance => Customize => Theme Settings => Navigation Settings then check/uncheck "Enable Search on Main Menu".