Hey there MLA74,
Thanks for reaching out to the Apple Support Communities. If you haven't already, we would recommend ensuring that you've disbanded or removed your ex husband from the Family Sharing group using the steps in the 'Related Article' under the "Remove someone from your family group" section.
If you have, or if you've completed disbanded the family group, we'd also recommend going through the steps in the following resource to ensure that you and your son's accounts are secured: If you think your Apple ID has been compromised - Apple Support
While we're not saying that your account is compromised at this time, the steps above will walk you through changing your Apple ID/iCloud passwords, and enabling two-factor authentication which is designed to prevent anyone from accessing your account, even if they know your password.
If two-factor authentication is already set up, take a look at this next resource to ensure that your ex husband doesn't have a trusted number or device that can receive verification codes needed to sign into you or your son's Apple ID: Manage two-factor authentication for your Apple ID from iPhone - Apple Support
We hope that's able to help.
Take care!