Internet not working when I changed Router DNS to RPi(3b+) DNS

You need to change the router DHCP so that it provides the Pi-hole IP.

If you cannot do this on your router, then disable DHCP on the router and enable DHCP in Pi-hole.