Many of us use multiple Photos Libraries. I sync my Favorites Library that has pictures copied from my Nikon Library and from my Old Family Picture Library, etc. There is no accidental swapping of the System Library designation. The System Library is the only Library that can be connected to iCloud. The System Library should be connected at all times, so I use the internal drive of my MacBook. but Libraries can be located on external drives as long as they are Mac formatted, directly connected, and not networked or cloud or NAS or stuff like that.
The System Library is designated with a button in Photos Settings>General. iCloud is turned on in Settings>iCloud.
This setting is manual only. The setting stays with the Library.
Since my iPhone and iPad are also connected to iCloud, photos and screenshots taken by them get synced to iCloud and the Mac, and vice-versa. So in addition to copying pictures from Nikon to Favorites, I copy new pictures and screenshots to an iPictures Library. I delete the less interesting ones from Favorites.
Those of us who use multiple Libraries use the trusted 3rd party app PowerPhotos ($30) to make copying between Libraries simpler. PowerPhotos preserves album structure in copies, so I can copy whole albums at a time and keep them together. I keep PowerPhotos open all the time, and I use it to switch from working with one Library to another. You can also just double click on a Library to open it.
Lots of people do this, and I don't think any of us have suddenly found our entire archive suddenly appearing on iCloud!