Hi H794,
Check your NSG rule for connecting to your Azure VM. I'd verify that your Public IP address is still the same as listed in the NSG rule for connecting via shell (I'm assuming you are talking via SSH which is port 22). Verify your inbound port rules to ensure they match your Public IP address.
Connect to a Linux VM
https://learn.microsoft.com/en-us/azure/virtual-machines/linux-vm-connect?tabs=Linux
If this is helpful please accept answer.