https://www.wpbeginner.com/beginners-guide/google-search-console-ultimate-guide/
https://www.example.com/?s=
If the soft 404 errors you are seeing are caused by WordPress search function, then the easiest solution is to stop Google bot from crawling search URLs. To do that you need to add the following lines to your robots.txt file.
User-agent: *
Disallow: /?s=
Disallow: /search/