Asked about The shell and the server
How do you find what is using a port?
An answer that works
lsof -i :PORT, or ss -tlnp on Linux. It gives you the process id, which you can then inspect or kill.
Reading an answer is not being able to give one. The section that teaches this is The shell and the server, 6 hours of Linux & the shell.
Learn this properly