Hi,
Thank you for posting your query.
Kindly follow the steps provided below to resolve your issue.
This topic describes how to connect to your SQL on Azure virtual machine (VM). It covers some general connectivity scenarios and then provides steps in the portal for changing connectivity settings. If you need to troubleshoot or configure connectivity outside of the portal, see the manual configuration at the end of this topic.
If you would rather have a full walkthrough of both provisioning and connectivity, see Provision a SQL Server virtual machine on Azure.
Go to this link for your reference and other troubleshooting procedures https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/ways-to-connect-to-sql
Do not hesitate to message us if you need further assistance.
If the answer is helpful kindly click "Accept as Answer" and up vote it.