Google Search Console Indexing Error.

Job ID: 35282111

Budget: ₹600 – ₹1,500 INR

I have a website which was hacked by adding some malicious codes. which created around 2000 irrelevant posts. I have deleted and cleared out all malicious codes and unnecessary files from website and database.
It's been 3-months now but still google index those irrelevant links. i don't know how google is indexing those. those URLs are also 404 now. but still google crawl those pages. Need to get this removed.