This article (Combine libraries in Photos - Apple Support) is Apple recommendation, but the method will not merge the libraries as libraries. It will just transfer the photos between libraries. All library structure will be lost - the albums, the adjustments, metadata added in photos, because we need to transfer the unmodified originals to preserve the highest quality. If we transfer the edited versions as well, they will no longer be paired with the originals. There are ways to merge the libraries and to preserve the library structure, i.e. if you are using iCloud you can simply merge the libraries in a lossless way by making both libraries your iCloud Photos Library in turn. Both libraries will be merged in iCloud and the merged library will sync back to your current iCloud Photo Library on your Mac.
The full paid version of Power Photos can also merge Photos Libraries and save the metadata and albums - it is a great tool to have as a companion to Photos for Ma - but it cannot merge iCloud Photos Libraries fully, if "Optimise Mac Storage" enabled.
See: Notes on Merging Photos Libraries, 2019 Version