sitemap.xml and 404 redirect

Good Morning,

my sitemap.xml does not work. And where can I configure 404 redirect, for urls which no longer exist?

best regards
Claudius