Hi @Ramin Payandeh ,
what kind of Public IP SKU is associated with the NIC of the VM?
If it is a Basic Public IP
there is no requirement of an NSG. The IP and all ports should be reachable by default.
If it is a Standard Public IP
all ports are blocked by default. You have to create and assiciate a Network Security Group (NSG) to the NIC and create a Inbound Security Rule that allows SSH (Port 22) -> https://learn.microsoft.com/en-us/azure/virtual-network/tutorial-filter-network-traffic#create-a-network-security-group
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten