Links to 404
Broken links are a result of the destination URL no longer pointing to any content.
They result in a bad user experience, so excessive numbers of links resulting in a 404 error should rightly affect a ranking consideration.
Any 404 should be resolved with a 302 or 301 redirect. Google Search Console will provide details of 404s in the Crawl Errors section, but it’s best to redirect broken links before they are found by Google.
This is a different ranking factor to the one about 404 errors, because this relates to links (which may all go to a single 404 page) whereas the other relates to the number of different URLs called that result in a 404.