how to host apps that need a port configured

ok so uhm i have a python app that needs a port to be configured and well i every port i try either says - access denied - port in use so uhm how to fix this

You can't open additional ports on PythonAnywhere -- but you can have multiple API enpoints.