It’s not clear whether your iPhone has an exploit loaded, or what’s going on here.
Nor is it clear exactly what was demonstrated to,you, nor why.
Change your Apple ID password.
Change your passcode to a longer password, and enable Touch ID.
Change the passwords on your recovery email server.
Review whether anyone knows your recovery questions.
Review whether anyone has access to your recovery telephone.
Back up and wipe and re-install and restore your backup on your iPhone.
Also enable two-factor authentication, on your Apple ID, and on your cellular account.
Disable location and Find My for anybody you don't want to have that data.
Check with the local shelter and/or domestic violence folks and/or legal representation.
And don’t jailbreak. And don’t install VPN clients, or such.