Crawling and indexing are different things
Robots.txt controls crawling for cooperating bots. Meta robots controls indexing behavior when a page is fetched.
Understand robots.txt
A robots.txt file lives at the origin root. User-agent groups contain Allow and Disallow path rules. A matching path may be blocked from crawling, but that does not necessarily remove its URL from search results.
Understand noindex
A page-level robots meta tag can ask search engines not to index a page. A crawler must be able to fetch the page to see this directive. Blocking the same page in robots.txt can prevent the crawler from discovering noindex.
Test carefully
Try both the path you mean to block and nearby paths you mean to allow. This checker handles wildcard and end-anchor path matching and uses the longest matching rule, preferring Allow on a tie. It is a practical subset, not a crawler implementation.
Keep private data private
Robots.txt is public and is not access control. Protect private pages with authentication and authorization. Never put secrets in robots.txt or rely on a Disallow rule to secure a file.
Further reading: Google’s SEO Starter Guide