I can't connect to the internet through Pihole (Android - Wi-Fi)

Hi, I hope this is the right category.

First of all, I'm new to this. I have a superficial understanding and I've followed tutorials to install Pi-hole using Docker and combined it with Wireguard. Everything seems to work.

I can connect my phone to Pi-hole through Wireguard just fine, but I can't connect to Pi-hole without Wireguard over the same Wi-Fi network.

I've already added Pi-hole's DNS to my phone's network and I have a static IP address for that network, but every time I try to connect, the web interface shows this:

dnsmasq warning: Ignoring query from non-local network (and my phone's IP address)

From what I've read, Pi-hole prioritizes wired connections. However, I discovered through the web interface that I can connect if I enable "Permit all origins" in the DNS settings. But I'm worried because it says it's dangerous to have it set up this way.

I know I can add the DNS to the router, but I don't want to have Pi-hole on the entire network, only on a few selected Wi-Fi devices.

Is there a way to assign static IPs to a sort of whitelist?

I'm using a Raspberry Pi 5 and I have the latest version of Pi-hole, if that's relevant.

I'm a beginner, so if anyone can give me detailed steps, I'd appreciate it. If you need more information, I can provide it, as long as you specify what you need.

Did you mean Wireguard?

*Facepalm

Yes, Wireguard, well now you know how much of a novice I am, haha.

I edited it so that it is better understood