I wanted to override the default DNS in WSL:
add the following section to /ect/wsl.conf (if not present create the file)
pnetwork]
generateResolvConf = false
Then restart wls (in powershell wsl --shutdown)
Create a normal resolv.conf file and add your dns settings.
I also made the file immutable since someone posted that it would be wiped clean on reboot:
sudo chattr +i resolv.conf