Typically if one has two subnets, one needs a DHCP server for each one. If you configure your DHCP server for one subnet it likely breaks the other network.
Wire it to the main one.
ISP Gateway. <---> Main Gateway. <---> IoT Gateway
The ISP Gateway has its own DHCP service. It supplies the IP for your Main Gateway’s WAN port (or sometimes it’s static).
Your Main Gateway has it’s own DHCP service that supplies the IPs for all the devices directly connected to it.
The WAN IP for the IoT Gateway comes from Main Gateway’s DHCP. The IoT Gateway has its own DHCP service that supplies all the devices connected to it. It also has a different SSID from the Main Gateway.
On the Main Gateway, firewall settings limit the ability for any traffic coming from the port the IoT Gateway is plugged into from reaching the Internet. Routes are set up to route traffic between the IoT network and your Main network.