Sorry, @thsnyzkn. That would have been helpful to include!
See /etc/network/interfaces. If you have a more recent Ubuntu distribution, you might instead of /etc/netplan/01-netcfg.yaml (or something else in the same directory); netplan is entirely differently configured, but if it’s broken might cause the same problems.