Hi @Muhammad Tahir ,
please try if this helps: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/reset-network-interface
If you want to provide a "static IP" to a VM please never do this inside the VM OS. Always set the IP to static from "outside" in the Azure Portal or PowerShell.
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten