Android: more open, way more apps since Google doesn't have too approve every single one, is used on far far more devices than iOS which means Android is the bigger target, operating system is pretty fractured
iOS: Apple maintains a very tight reign on EVERYTHING, far fewer apps but they're individually scrutinized by Apple, Apple enables drive encryption standard, far far less OS fracturing thanks to apples tight reign on everything
Both use sandboxing, which will limit any impact a particular app could do.
If you're a Mac person, you'll be happier with an iPhone. Coming from someone who's used MacOS, Windows, and Linux, as well as iOS and Android. My androids were always just okay, but my iPhones have always been great. I can see why people love Android, I also see why people love iOS.