Step 1:-
Run the command line as an Administrator. Then run the below-mentioned command.
netstat -ano | findstr :port number
Copy from here:-
netstat -ano | findstr :8080
Step2 :-
After that, you will get this kind of result
so here last digit 3444 is your PIDtaskkill /F /PID PID
taskkill /F /PID 3444
By following these steps and being cautious when ending processes, Windows users can effectively manage port usage, ensuring a secure and efficient computing environment.