Pi-hole is blocking ads correctly and can connect to the internet according to the debug log, so you can ignore that message.
Since Pi-hole is blocking ad domains, your devices must not be set up correctly if you are still seeing ads. Make sure your devices are only using Pi-hole for DNS.
You are using more than just Pi-hole for DNS, so you will get DNS results from more than just Pi-hole, and some ads won't be blocked. Only use Pi-hole for DNS so that all ads are blocked.
Reinstall the entire system. I think the problem was because Pihole ran from Wi-Fi. Now install the RPI with Ethernet. Still configuring everything from scratch. We'll see if it works.
I don't think the problem is wifi. That's just the method of transmitting data - if you can connect to the PiHole that is not the issue. I run several PiZeroW on WiFi only with zero problems.
You need to check each DNS client and ensure it is using the IP address of the PiHole (192.xxx). Old DNS addresses can linger in caches. Clear the DNS cache on each device and if needed renew it's DHCP lease. This will get all the devices using the PiHole as DNS server.
And can you tell me how do I do that in Debian?
I followed the instructions of Mcat12, I installed "nscd" and ran "$ sudo /etc/init.d/nscd restart
"
to clear the DNS cache on the client machine. I still do not know if I have to do it on the raspberry pi where PIHOLE runs. And I'm reinstalling PIHOLE because I had uninstalled it.