Network is unreachable / Temporary failure in name resolution

I’ve been using Ubuntu 22.04.1 LTS (x64) via VMWare (my main OS is Windows 10) for the last month.
Recently when I try to ping (www.google.com for example) I get

ping: www.google.com: Temporary failure in name resolution

I followed some answers on different posts about this and yesterday, when I added the next line:
nameserver 8.8.8.8 to my /etc/resolv.conf it fixed it for me.

Today, after I rebooted the machine this problem happening again, but this time adding the nameserver 8.8.8.8 didn’t work, and when I try to ping 8.8.8.8 I get:

ping: connect: Network is unreachable

I tried doing the proposed answers there: https://askubuntu.com/questions/1393818/temporary-failure-in-name-resolution-continuously, https://askubuntu.com/questions/1090706/connect-network-is-unreachable
but that didn’t help neither.

Additional info: on my main OS (Windows 10 x64) everything is working completely fine.

Now, when I look through my host it seems that the vmnet1 & 8 have no dhcp enabled, but I can’t figure out how to enable it.

Thanks for your time!