Hi,
In general, we can change the dns querying by changing the priority order of NICs, use powershell cmdlet such as Set-NetIPInterface with parameters -InterfaceIndex and -InterfaceMetric. However, the query order is affected by multi factors, including group policy, registry etc.
Below articles just for your reference.
Configure the Order of Network Interfaces:
DNS Name Resolution in Windows with Multiple Network Interfaces
https://yogadns.com/docs/interfaces/#easy
Note: Since the websites are not hosted by Microsoft, the links may change without notice. Microsoft does not guarantee the accuracy of this information.
Best Regards,
Karlie Weng
If the Answer is helpful, please click "Accept Answer" and upvote it.