You can't merge Apple IDs. You can do the below multiple times using a different ID and finish with the ID you use now. It will transfer all iCloud data if syncing is turned on for each item.
When changing to the new ID, make sure you turn off Find My Phone before signing out of the old ID. Once signed out and Find My Phone is off, then sign in with the new ID, then turn Find My Phone back on. There may be some data loss, but you can minimize it. If syncing photos with iCloud, ensure Optimization is turned off in Settings/Your Name/iCloud/Photos and/or in Photos/Preferences/iCloud. Then make sure full resolution photos are on the device/computer. When signing out of iCloud, if asked whether you want to retain data, choose yes. Messages conversations will be lost if they are addressed to the ID. See the article below for other places that the old ID should be removed. See Winston Churchill's response in the below discussion. If possible, also set up Family Sharing between the IDs to keep access to your apps/purchases.
How to switch Apple IDs on your iPhone or iPad.
What to do after you change your Apple ID or password - Apple Support.
How to transfer all files from one iCloud account to another.
Family Sharing.
Family Sharing - Set up.