How long does it take Google to stop showing for 404 pages in search results? – SEO Help (General Chat)

404 pages will take a few crawls for it to be removed from the index

there are 2 ways to remove it faster

go to search console and use the removal tool this is the quickist way
use a 410 code if you know that page is not going to be used again
one thing you need to check for first is that the page does not have any backlinks because if you 404 a page with good backlinks it will hurt the whole site, so make sure you 301 those pages to a recent page that would be useful to the user