This is only while you're running in the debugger and should have no impact on your production code. It is for hot reloading. Since it should not be causing any issues with your app nor really be used outside debugging then I would leave it alone. However if you want to disable hot reloading refer to the docs here which discuss how to do it based upon how you're starting your app.
What is aspnetcore-browser-refresh.js and how can I stop VS 2022 from adding its own client side script
What is aspnetcore-browser-refresh.js's purpose? How can I stop it from being deployed to my projects.
VS 2022 keeps adding client side scripts to my projects. I am spending a lot of time trying to debug them and prevent them from being pubished. I great example of this is the amount of effort it takes to disable Browser Link (no it does not disable just by clicking the disable button from VS's toolbar.) I am writing my own HTML JS front end and only using Web API for server calls. I am using Swagger UI but that is not VS either. Aspnetcore-browser-refresh.js is only being deployed with my static html file.