You can limit what can be added to your section with the
create option. You can find this example in
site.yml of the Starterkit:
This means that the section displays all pages that have a template listed under
template, but the user can only create new pages with the
default template. The
create option also accepts an array of multiple possible templates.
Also, if you limit templates in the template options, no pages with other templates can be created through this section. The
create option limits this even more.
In your example above that means that only pages with the templates X and Y are displayed, but at the same time the user can’t create any templates with the template Z, so you wouldn’t have to worry about this template not showing up in the list.