The Database Connection in server connect points to exact the same database as the connection in the database manager.
The only different is that the one in server connect is used - server side, so on your server, while the one in the database manager is a direct remote connection. But they do point to the same thing.
Both use the same name - just can have different settings depending on the access rights.
Each target has its own database settings. Still under the same database name - but you can enter different settings per target. This way you will have different database settings for your local development - and other for your live target.
To edit the different settings - just switch to that target, edit the connections settings and save them.
In the case of docker - if you choose to use the docker database per target - docker settings auto generate the needed database connection settings , when you save your project settings. So there is no need to edit the settings separately. We even prohibit this in the from last update