In most cases, the Oracle Database component's port number is listed in the tool used to configure the port.
portlist.ini file. This file is located in the directory %ORACLE_HOME%\install.portlist.ini file, so you can rely on this file only immediately after installation.