With the information provided so far, it's difficult to determine the root cause of the issue. A DHCP failure can be caused by several factors, including an incorrect VLAN assignment, switch port misconfiguration, missing DHCP relay, an incorrectly configured DHCP pool, VLAN 10 not being allowed on a trunk link, or a connectivity issue between the clients and the DHCP server.
To help troubleshoot the problem, I'd recommend sharing the network topology along with the relevant device configurations.
As a quick check, try assigning a static IP address in the VLAN 10 subnet to one of the PCs and verify whether it can reach the default gateway. This can help determine whether the problem is DHCP related or a broader Layer 2/Layer 3 connectivity issue.
I am not a Cisco employee. My suggestions are based on documentation of Cisco, best practices and day-to-day experience.
Please, if this post was useful, leave your kudos and mark it as solved.