Oracle DBA - what's the difference between the connection strings?
I have an answer for this right here:

What database name should I use to connect Tomcat with my database

Essentially there's 2 ways you can connect to the DB - with the SID or a Service Name.  In Oracle 12c and up, the option for connecting via SID is essentially gone away.

A SID is not a good way to identify a database, all it really does is identifies a particular Oracle instance running in a particular Oracle Home.

You should be using service names to connect in 11g+.