There is no malicious software or virus that has been installed. Anyone that knows your iCloud password can access your data. For example with iCloud Photos, they can delete photos and that will also remove the photo from your phone. That requires no access to your device, it is the simple syncing function that iCloud is designed to do. Other things they can do with your iCloud Password is set up a device using your iCloud Backup, where the device will appear exactly like yours, and also use Find My to see your location.
None of that requires any hacking ability, installing malicious software, and your device is not being directly accessed. It means your Apple Account has been compromised and you should follow the steps here.
If you forgot your Apple Account password - Apple Support
I would also recommend reviewing your account to make sure that the Trusted Phone Number is your own and not your girlfriends.
Two-factor authentication for Apple Account - Apple Support
You can view any other device that is signed into your account at Settings > [name on top], and scroll to the bottom. Any device seen there that is not yours is using your Apple Account/Password and you can tap on it to delete, and follow up by changing your Password, so they cannot login again.
If there is a chance that they have physical access to your iPhone, then you also want to change your Passcode to prevent access.
Set a passcode on iPhone - Apple Support
I also recommend running Safety Check to review what data you are sharing and that will also show the data shared by apps. There are legitimate apps used by others that will do things like share your location and Life360 is one example. It is not a virus and has a legitimate purpose, but using Safety Check you will be able to see any app that is using your location data. Many of these previous steps can also be done with Safety Check.
Safety Check for an iPhone with iOS 16 or later - Apple Support
You can reset your phone, but without changing your Password and following the other recommendations there will be no change because it has nothing to do with your device. Restoring from a backup will just put you in the same state and using the same account without changing the Password will still allow them to access your iCloud data. The instructions to reset your device are here and this will wipe all data, you will not be able to restore from your backup as that will put everything back.
How to factory reset your iPhone, iPad, or iPod touch - Apple Support.