If you're installing OctoPrint on a Raspberry Pi, you don't need a Microsoft account. I'm not sure I understand the problem - could you provide more details?
Basicly i downloaded octoprint on my laptop then set it up with port 5000 and i deleted all the files of it without deleting the port and now i cant delete it
You can't 'delete' a port. That's not how they work. OctoPrint would use the port when you run it. If you've uninstalled OctoPrint & the associated files, then it won't be able to run anymore and it won't be able to use the port.