Hello @Kartik ,
Apologies for the delay in response.
Please refer the below troubleshooting doc to check any NIC or connectivity issues:
https://learn.microsoft.com/en-us/azure/virtual-network/troubleshoot-vm-connectivity#azure-vm-cannot-connect-to-the-internet
NOTE : Any network configuration (DNS, static IP etc.) must be done from the Azure portal and not from within the VM itself.
Refer : https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-network-interface#change-dns-servers
Kindly let us know if the above helps or you need further assistance on this issue.
----------------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.