Hi @Shivani Tyagi ,
I hold the view that this is a connection problem, and you can check this official link : https://learn.microsoft.com/en-us/azure/azure-sql/database/firewall-configure?view=azuresql , I hope this can be helpful.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment"