Run oradim to Create the Oracle Service: Use the following command to create the Oracle service:
oradim -NEW -SID your_sid -INTPWD your_password -STARTMODE AUTO
Start the Listener: If the listener is not running, you can start it using:
lsnrctl start
If the service starts successfully, try connecting again