Hi
Welcome to Microsoft Q&A community forum!
You can check with connection troubleshoot from the specified vm
Please follow up the next steps:
In the Azure portal, navigate to the Virtual Machine resource that is experiencing the outbound internet connectivity issue. The resource will default to the Overview blade in the left pane.
Scroll to the bottom of the Overview blade, and select Connection Troubleshoot under the Support + Troubleshooting header.
Select Outbound Connections, and then specify the following options:
Connection Destination: Other IP address/CIDR
IP address/CIDR: the internet protocol (IP) address that you are trying to connect to (or enter 8.8.8.8 for a general internet connectivity check)
Service: HTTPS
Port: Leave set as 443
Protocol: Leave set as TCP
Select Test connection.
If the connection fails, the test results will indicate which NSG or UDR is interfering with connectivity.
If the connection is successful, this means that the Azure platform is allowing outbound internet connectivity. Check within the VM for configuration issues in the destination configuration.
check also this link:
https://learn.microsoft.com/en-us/azure/network-watcher/network-watcher-connectivity-overview
Hope this helps
Cheers
Luca
Please "Accept as Answer" and Upvote if the answer provided is useful, so that you can help others in the community looking for remediation for similar issues