robots.txt controls which crawlers may request parts of a site. An XML sitemap helps search engines discover canonical URLs you want considered for indexing. They solve different problems and neither guarantees that a URL will be indexed.
Robots.txt is a crawl instruction, not an index-removal tool
A disallowed URL can still be known to a search engine through links or other signals. If a page must be excluded from search results, use an appropriate index-control method that the crawler can access; do not rely on blocking the page in robots.txt to communicate noindex. Keep important CSS, JavaScript and public content resources crawlable when search engines need them to understand the page.
Build a clean sitemap
Include absolute URLs for pages you want indexed, using the preferred HTTPS hostname and canonical path. Exclude redirects, noindex pages, error pages, duplicate variants and private URLs. Keep lastmod accurate when it is provided; do not update it on every request merely to make URLs appear fresh.
Choose one canonical hostname and protocol for the site.
Check that every sitemap URL returns a successful response and has a self-consistent canonical.
Remove redirected, blocked, noindex and duplicate URLs from the sitemap.
Make sure the sitemap is linked from robots.txt and submitted in Search Console.
Review sitemap processing and page indexing reports separately.
Investigate indexing states with URL-level evidence
Discovered - currently not indexed and Crawled - currently not indexed are not fixed by repeatedly resubmitting a sitemap. Inspect each affected URL for content value, duplication, internal links, rendering, canonical selection and response behavior. A sitewide count alone is not enough to prescribe a safe fix.