How to disable WordPress Search from Url?

There’s a filter to remove this feature, which is known more commonly as autocorrecting the URL rather than “search” per se. Place this in your site-specific plugin or your custom/child theme’s functions.php file:

remove_filter('template_redirect', 'redirect_canonical');

There is also an old plugin that does this. See https://www.bloggersignal.com/stop-wordpress-from-guessing-urls/ for details.