Hi @Anubhuti Gupta,
Did you open 22 on your VM?
Please look into detailed guide below:
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/connect-ssh?tabs=azurecli
or if you have another service on this port please try to open 22 on Windows/Linux Firewall.