Only one of your photo libraries can sync with iCloud. One of your Photo Libraries can be made your System Photo Library in the Photos > Preferences > General, while you are viewing this library in Photos. Click the field "Use as System Photo Library". If this field is disabled, the library is your System photo Library. Then you can enable iCloud Photos to let this library sync with iCloud or enable the shared albums to be able to access them from this library.
You can keep switching between libraries and view them in turn by double-clicking the library you want to open, or merge them by exporting the photos from one library and import them into the other library- this is Apple's recommendation (Combine libraries in Photos - Apple Support)
Alternately, you can upload both libraries to iCloud Photos and the will be merged in iCloud. Or use Power Photos, see: Notes on Merging Photos Libraries, 2019 V… - Apple Community