Keylogger for iphone
Truecaller is by far the best I’ve come across it has a free and paid version I personally use the paid because it’s very cheap and in my opinion totally worth it (and I am very cheap when it comes to subscriptions to things I could count on one hand how many I have) but either way the paid and free versions are great especially for the blocking feature.
Alternatively, if there’s no way of stopping it, factory resets should be a good start. This should clear out any software placed on it that isn’t root level, or hidden in system partitions. I’d say root and rom it yourself but that may not be possible based on your level of expertise, and the parameters of the phone itself. You may also want to try a local carrier store, and have their techs do a complete wipe and reinstall all the system files. https://celltrackingapps.com/best-keylogger-for-iphone/ is great for me here.