Hi,
You can first check if there are IP connectivity to the VM. Try to telent or try any layer 4 connectivity test to your VM's Public IP on port 3389.
If that is closed, then you need to check if you have allowed port 3389 in the Inbound rule of your VM's NSG.
You can also follow this troubleshooting guide: https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshoot-rdp-connection