The search feature mostly fails because of the ‘language information’ that is included in the search URL automatically after activating the Polylang plugin.
To fix the issue, adjustments are required within Polylang. Navigate to ‘Languages > Settings,’ select ‘URL modifications,’ and enable ‘Hide URL language information for default language.’ Additionally, ensure that ‘The front page URL contains the language code instead of the page name or page ID’ is checked.
Finally, save your changes.