How to use only DNS Servers from quad9 and others located in the EU

What can I do to allow only DNS servers which stand in the EU in pihole?

I'm afraid that if I use 9.9.9.9, for example, I could also be connected to locations outside the EU.

Fundamental services (like the DNS roots) as well as big company services can be expected to leverage anycast routing in order to route a request to the closest/fastest responding server, so you can't be sure where a DNS request to 9.9.9.9 would be served from.

But why would you bother about the country of residence where a DNS server would handle a specific DNS request of yours? The DNS service provider has your DNS history anyway, regardless where its servers are located.
Your prime concern should be whether you'd trust your chosen DNS provider in the first place.

I want to use a server which holds no log files, does not save my ip address and resides in the EU because of DSGVO.

What do you recommend?

If you run unbound in recursive mode you eliminate the 3rd party server completely.

https://docs.pi-hole.net/guides/dns/unbound/