There are two factors that determine which resources are delivered to which devices via ZTP:
1. Device Resource Bundle matching
As well as containing resource files themselves, each Resource Bundle itself has a few extra parameters: device vendor, device MAC address(es) and device serial number(s) (not supported by all vendors). Of these, only the device vendor is mandatory.
When a managed device broadcasts a BOOTP/DHCP request to initiate ZTP, it advertises its vendor ID string, MAC address, and in some cases serial number. These values are compared to the values in each Resource Bundle contained on the local node.
If there's a match, the local node provisions the device with the resource files in the matching bundle.
2. Resource Distribution
Node Inventories are used to selectively control which Resource Bundles are pushed to which nodes.
A node will only respond to a BOOTP/DHCP request on its local network if a matched Resource Bundle has been pushed to it.
Note that resources are not distributed any nodes by default.
Note: Baseline vs. final device configuration
Broadly speaking, there are two approaches to device provisioning using ZTP.
You may use strict matching and distribution settings to provision specific devices with unique, final configurations.
Alternatively, you may use laxer matching and wider distribution settings to provision many devices with a baseline configuration, e.g. "just enough configuration" to route to a central production configuration system for final configuration and service provisioning.
You may also combine the two approaches, e.g. use a reverse MAC address match to opt a specific device or devices out of an otherwise general, baseline configuration.