I believe that the session should only be created on the server side when the user login to their account.
So, for example, when users visit a website without login, they still get a general cookies. Then, if later they decide to login to their account, a session ID stored in cookies will be provided to the clients from the server. In this case, will the cookies that contain session ID replace the general cookies, or, both of the cookies will exist together?
Hope for explain with simple terms. Thanks!
This is an implementation detail of the website, so this can't be directly answered.
The session cookie may be created server side and associated with the saved session, but it still has to be saved client side so that the client browser can remind the server which session to use (and verify it).
From the browser's perspective, there is no difference between a session cookie and any other cookie. It's just a cookie. So there's no technical reason why all the cookies can't coexist as long as there are no name collisions.
From the web server's perspective, if the non-session cookies had a purpose, that purpose is likely still there when there is a session, so deleting them to use the session in its place would probably just make the code more complex. But this doesn't say if they will or won't do that.
So, another way to ask the question would be "Are the authors of the website going to be lazy and not bother deleting redundant cookies, or are they going to be fancy and merge them into the session and clean things up?"
Also consider the session cookie and the other cookies may all have different lifetimes, so it might not make sense to merge them anyway.