What kind of device are we talking about? Do you use the client software of your VPN provider? What's your VPN provider?
Let's assume you use a desktop PC with the client software of your VPN provider:
Make your OS use the DNS servers of NextDNS. This will make your PC always use NextDNS. Now when you activate your VPN connection with the client software it overrules your OS's DNS settings (as long as you're connected to the VPN server) and tunnels all DNS traffic through your VPN tunnel to avoid a DNS leak.