As a web-developer, we often use a plugin of VS-code called live server plugin, do you know how it works? Let me tell you in simple terms.
When we write an HTML, then we run that HTML by double clicking that file and that is the ideal way of running an HTML file, but there is a problem with this way, since you loaded the website, this website in this current state loads in the memory and then memory serves you. The problem is whatever the current state of the webpage that is there in the memory(RAM), if we change anything in the HTML file that does not change in the output file automatically obvious reason is we have loaded or opened up the previous version or the state of that Web page in the browser, but if we refresh the webpage then it changes because we refresh the current state of the browser. Now as a developer, it's very difficult to refresh the webpage again and again to overcome this problem there is an extension called live server- by Ritwick Dey in vs code extension marketplace. This piece of code or this extension continuously notifies our browser to refresh the current state of the browser if there is any kind of change in the code file.
Thanks for reading.