A sitemap is a map of important URLs
An XML sitemap helps search engines find relevant pages, especially on new sites, catalogues, or large structures.
It should list final indexable pages, not redirects, errors, or duplicate URLs.
robots.txt defines crawling limits
robots.txt allows or blocks crawler access to paths. It is not the correct tool to remove an already indexed page.
An overly broad rule can accidentally block important resources or sections.