Hi,
You need to configure the DHCP server in both switches. But you need to split the network into two.
eg:
If you have 192.168.1.0/24 network. you could assign the first 128 ip address to the switch1 scope and exclude them from the switch2 scope. On the switch2 side you assign 128 to 254 and exclude this range from the switch1 side.