WordPress asking for FTP details when installing plugins

The port of Apache web server is only used for HTTP protocol, that is actually serving web pages. It is different from file transfer protocols and Apache itself actually doesn’t implement those functions, they are handled by their own server software.

If SFTP port isn’t default, you should look up in the documentation or contact support about what connection details precisely should you provide to WordPress.