“Indexed, though blocked by robots.txt” shows in Google Search Console (GSC) when Google has indexed URLs that they aren’t allowed to crawl.
In most cases, this will be a straightforward issue where you blocked crawling in your robots.txt file. But there are a few additional conditions that can trigger the problem, so let’s go through the following troubleshooting process to diagnose and fix things as efficiently as possible:
You can see that the first step is to ask yourself whether you want Google to index the URL.
Read the complete article at https://ahrefs.com/blog/indexed-though-blocked-by-robots-txt/.