I am getting "Name or Service Not Known" error after ping www.google.com

Hi, I have created Centos 9 Virtual machine in Oracle Virtual box as per the video in the Kodekloud course- “DevOps Prerequisite course” under Lab Service.

After that, I did ping www.google.com and got the Error “Name or Service Not Known” error.

I even tried to add the DNS 8.8.8.8 and 8.8.4.4 in the “/etc/resolv.conf” but it didn’t work.

Please advise what I am doing wrong here

The network adapter is probably not connected. Please follow this guide.