Some day ago I am facing one issue in magento 2 with overwrite module’s PHTML file in my custom theme,
So here is the solution ,
- Copy the Phtml file from module (For module location On template path hint)
- go to MAGENTO_ROOT/app/design/frontend/VENDOR/YOUR_THEME/MODULE_NAME/templates/filename.phtml
Here MODULE_NAME is your module name from you copy the phtml file In my case its Magento_Search.