The recent pegasus attack has ended all year of this debated topic that iOS has woned every time. Learn more about the attack from https://readus247.com/pegasus-spyware/.
According to Project Pegasus 2021, current Pegasus software can exploit all iOS versions until iOS 14.6. WhatsApp revealed in May 2017 that Pegasus had exploited an error in its code to infect over 1,400 Android phones and iPhones. The spyware can be installed on certain versions of iOS, and some Android devices. Pegasus is not a single exploit. It’s a collection of exploits that exploits many weaknesses in the system. Clicking links, Google’s Photos app and the Apple Music app are all possible infection vectors.
But as per the research done here, https://readus247.com/android-vs-ios/ iOS is more secure than Android of all time because of the restrictions they have set for the users without Jailbreak.