Pihole seems to be redirecting all local DNS to the internet

An [HTTPS] query is a non-standard query, and isn't yet supported in the RFC's (documents that govern internet protocols). This is discussed in the link I provided. The answer to [HTTPS] queries at this point in time will always be NXDOMAIN (the domain does not exist on the internet)/

Your Pi-hole can answer [A] or [AAAA] queries for local domains, if it knows the names of the domains which match particular IP's.

Here is a brief description of the various sources (and the order in which they are used) for Pi-hole to provide a local domain name:

As an example, on my Pi I have all my regular network clients mapped in a hosts file. I can ask Pi-hole for the name or IP of a client, and it will look in the hosts file and provide it.

nanopi-neo:~:# nslookup printer
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:	printer
Address: 192.168.0.4

nanopi-neo:~:# nslookup 192.168.0.4
4.0.168.192.in-addr.arpa	name = Printer.