We sometimes receive requests to turn off Shopify's search function itself, but this is an example of a setting that allows you to turn it on/off in the "Settings" section of the theme editor in case you want to reactivate it at a later date.
Example of adding an ON/OFF setting item for the search function to the "Settings" screen of the Shopify theme "Rise/Dawn"

[(For the Rise/Dawn theme) Setting method ①] Add the schema to "config/settings_schema.json" and the label to "ja.schema.json"

[(For the Rise/Dawn theme) Setting method ②] Add the code to "snippets/header-search.liquid"

[(For Rise/Dawn Themes) Setting Method 3] Turn off the "Search Results Section" in the "Search" template to hide the search form

