As the Times notes, Britney Spears’ iCloud account, and everything she did on it such as FaceTime calls, iMessages, notes, browser history and photos, were all mirrored on these two devices.
To set up such a surveillance system, all they needed was Spears’ password for her Apple ID, and consequently her iCloud account. It’s unclear, however, how they got their hands on the password, and whether this surveillance was authorized by the court overseeing Spears’ conservatorship, according to the Times.
Franceschi-Bicchierai, L. (2021, October 1). How Jamie Spears spied on Britney Spears through iCloud. Vice. https://www.vice.com/en/article/88nzgx/how-jamie-spears-spied-on-britney-through-icloud
The Clinic to End Tech Abuse, an advocacy group that helps survivors of abusive relationship who have been stalked and spied on, has comprehensive guides on detecting when someone is spying on you via iCloud, how to strengthen the security of an iCloud account, and what to do if you think someone has broken into the account and used it to monitor their target.