In settings > DNS
there is an entry for conditional forwarding
Conditional forwarding
If not configured as your DHCP server, Pi-hole typically won’t be able to determine the names of devices on your local network. As a result, tables such as Top Clients will only show IP addresses.
Activate this feature and put in your network address and the IP of the DHCP server.