# wlp111s0 is the interface name
# you can list devices by running:
nmcli device status
# the command to check what DNS servers are used by your network connection
nmcli device show wlp111s0 | grep IP4.DNS
IP4.DNS[1]: 1.1.1.1
IP4.DNS[2]: 8.8.8.8