So your ex wife hacked it?
Or are you using the same Apple ID on both phones?
Everyrhing we do under an Apple ID or Google account is recorded and can be accessed on another device with the same ID. I have more than one android device. My google account syncs, contacts, calendar, maps, bookmarks across all devices
I suspect you and the Ex still have an Apple ID in common. Please change your password and security questions and add 2step verification on your Apple ID.
I have changed phones 3 times since the divorce and changed the PW at least 15 times.
I also had her maps uploaded on my phone!
Another thing may be that you had family sharing turned on before your split and you never turned it off.
Use your own Apple ID, including email address and password. If you have been sharing the same iTunes ID, your payment method should be changed if it's not your bank card. This gets messy. If you do change your iTunes ID, your old purchases will remain on the former account. You would have 2 separate purchased lists, logging in and out of them. Also, remember if you change your ID, be sure it's correct in iMessage and Facetime as well as iCloud.
if he changes his Apple ID, all his purchases are available. If he makes a NEW Apple ID, then he cannot access previous purchases. Big difference.
I don't see anything about turning off family sharing....
About family sharing. iCloud - Family Sharing - Apple
You need to do more than change password, you need to prevent someone from accessing your related email.
Change Apple ID. Change your Apple ID - Apple Support
Well even if he makes a new Apple ID he can still access the old one and it's purchases as long as he has the password. I have purchases on my iPhone and in my iTunes from when I first had an Apple ID for itunes (way back with the iPod mini lol). When I added them to my new MacBook Pro I had to log in to that old account although the email address technically doesn't exist anymore. But I still have access to everything ever purchased under that ID.
Changing the password is fine IF she doesn't know the info to request the password (answers to hint questions for example). I've had it where I let friends have some of my iTunes music in their library but when I needed to delete all associated computers (for example) because I didn't have access to one and needed to add a new one I did so and changed the password. Those friends were no longer able to listen to those songs associated with my Apple ID without knowing the password to allow their computer to be one of the 5 allowed. But if he wants to be safe overall he should change his Apple ID. When in doubt reach out to Apple about the best way to move forward.
ive done that 8 times.