XML sitemaps should include all valuable, indexable URLs and not (just) top-level subdirectory URLs: https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap
However, search engines don't have to index your content; if they consider it low-quality then there's a good chance they won't index it.