How do I configure dynamic DNS to resolve only IPv6 or IPv4? Is there a corresponding switch or how do I set it?
That's a decision of the device that asks for the IP by querying the DNS.
If it requests the A entry, it will get an IPv4 address. By using the AAAA entry, it will be IPv6.
Right now the only way to handle it while using DDNS would be to disable dual stack of your internet connection, if you don't want it to be IPv4 + IPv6.
Could you tell me the specific steps?
Or how can I resolve only IPv6 when resolving to a remote IP address?
Depends on your OS.
Linux/macOS? dig AAAA example.com
Windows? nslookup -q=AAAA example.com
If you are using for example afraid freedns service with ddns package, you can configure it to update your IPv4 address, your IPv6 address or both. They use different records for A and AAAA address.