I am not clear as to the exact issue here but one of these two solutions may be suitable depending upon the details of your situation.
One is to simply change the email address on the one account. If it is a managed account then you may not be permitted to do that. The support article Change your Apple Account primary email address - Apple Support outlines various methods for changing the email address (Apple ID) you use for your Apple Account while retaining everything in your account. If you have an iPhone or iPad running iOS 18 or newer, read the support article for instructions how to do this.
The other is to migrate all purchases from one account to another. If you do wish to migrate purchases, Apple has several lengthy and detailed articles about doing this, including limitations:
- Purchases can be migrated from a secondary to a primary Apple Account to consolidate them. (This feature isn’t available to users in India.) —> Migrate purchases from one Apple Account to another Apple Account - Apple Support
- Learn about what purchases and associated content can be migrated between two accounts. —> About migrating Apple Account purchases between accounts - Apple Support