When a search results in a 404 error, SEO is not directly damaged, but the broken link experience will damage the user experience. This will indirectly impact SEO if not remedied.
The server itself will provide a standard page that isn’t very user friendly. Most businesses choose to customize a 404 page that includes a CTA to let users know what to do next.