If you should be getting a DNS resolver from DHCP then check that’s happening - you may need to reconfigure your Ethernet connection.
Also keep in mind things like VPN applications can interfere, so check what you have installed and running.
Otherwise, you’ll have to provide more information about your configuration and the differences between Ethernet and wifi; there’s not enough detail in your post to know anything other than “it doesn’t work”.
I’m not using a VPN and I did not change my network config recently, I’ve only changed the DNS addresses to use Clouflare’s after installing EndeavourOS last year
For now the only workaround is to unplug/plug the Ethernet cable from my laptop when this message appears or use Wi-Fi