Which twig template

plugins, such as form, provide twig templates with the same name as templates provided by the theme, eg. forms/form.html.twig

How do I find out, or work out, which template is applied?

The Grav system applies the first template with the right name. But which template is found first when there are multiple templates with the same name in the theme and plugins?

To find out, put code or markup in one that you know would be executed (e.g. not in an if block) if the template is used.

I am pretty sure any plugin template is overridden by templates in your theme though. The idea being that these are safe from plugin updates.