I am surprised that you have not had such problems before.
Depending on you circumstances, some devices could be reset to factory settings. For example, on an iDevice, you would use What to do before you sell, give away, or trade in your iPhone, iPad, or iPod touch https://support.apple.com/en-us/HT201351. Then, you would set up new Apple IDs using Set up your iPhone, iPad, or iPod touch https://support.apple.com/en-us/HT202033.
And, for some Apple IDs, you could use Eric Roots thoughts about creating a new Apple ID. Below, in my way of presenting this idea, is what is involved. I emphasize that all of what I say is covered one way or another by Eric.
See How to create a new Apple ID https://support.apple.com/en-us/HT204316 and
How to switch Apple IDs on your iPhone or iPad
https://www.imore.com/how-change-apple-id-your-iphone-or-ipad
See the data implications below.
Some of these things may apply even though not changing an Apple ID: What to do after you change your Apple ID or password https://support.apple.com/en-us/HT204071
Keep in mind that some things available under a first Apple ID will not be available under a new Apple ID. For example, you won’t be able to transfer anything purchased from the App and iTunes Stores to the new ID. And, there are other issues to be addressed.
And see what Eric Root says on this matter here https://discussions.apple.com/thread/251483565 and
what Winston Churchill says about it here: https://discussions.apple.com/thread/7452747
__________
But, despite any other data loss you can set up family sharing between the IDs to share purchases made with them. See:
Family Sharing https://support.apple.com/en-us/HT201060
Set up Family Sharing https://support.apple.com/en-us/HT201088