Ans. The following Link has resolved my issue
firebase local server can't connect to firebase database? · Issue #344 · firebase/firebase-tools
Dismiss GitHub is home to over 50 million developers working together to host and review code, manage projects, and…
Note: Why I posted the solution link here because. The first time, we look for the solution, then we find a lot of comments on Github issues and StackOverflow. Hence, We get confused after that. So, we don’t get confused. I posted it here and also easy for future reference.