This answer quotes ChatGPT
This problem may be due to port 5173 being occupied while your Vue project is starting. If you set up a local back-end service or another application uses the port, the port will not be available for the Vue project, resulting in an error.
There are two solutions:
Find the application using the port and stop it so that your Vue project can use the port.
When your Vue project starts, use another port(such as 5174).
If you can't find the application that is using the port, try typing netstat -ano on the command line. This will show you all the processes that are using the port, then find the process by its process ID and stop it.
If you are using Vue CLI 3, you can change the port on which the project runs by setting the port parameter in the scripts section of the package.json file. For example
"scripts": {
"serve": "vue-cli-service serve --port 5174"
},