For the creators of malicious software and scripts, iOS is a smaller target than Android: it's only used by one phone firm, Apple, and that means it's on far fewer phones. That doesn't mean iOS doesn't get attacked or that there aren't security vulnerabilities. It does and there are. But Android tends to be targeted more frequently because there are more phones to target, and many Android manufacturers stop issuing security updates for their devices after two or three years. At the time of writing, Apple is still offering iOS updates for phones going back to the iPhone 6S, which is seven years old.
The iOS App Store is safer than the Google Play Store. Apple has a stricter vetting process than Google, which makes it more difficult for malicious apps to get onto people's phones, and Apple makes it extremely difficult to install apps that it hasn't approved. Apple's App Store is also more serious about user privacy than Google, so you're less likely to have an app demanding access to absolutely everything on your phone for no good reason.
Parental controls on both platforms are very good and can do an excellent job of keeping your kids safe, whether that's blocking certain kinds of content or restricting app use.
How to stay safe on iOS or Android
The majority of threats to your digital safety aren't really technological: they're tricks. Fake emails pretending to be from your bank or other financial institutions, emails with dodgy attachments that you weren't expecting and didn't ask for, online offers that are too good to be true... none of these are specific to iOS or Android, so staying safe is as much about being cynical as it is about having a particular kind of phone.
That said, there are some technological things you should do. First and foremost, always make sure you have the most up-to-date version of your operating system and apps. Secondly, don't re-use the same login details on multiple websites: many people's passwords end up in website data leaks, and if you use the same ones on several sites then that's a massive potential problem. And thirdly, use all the security features that your device offers such as fingerprint or face recognition for security, two-factor authentication for key services (where you have to use an app such as Google Authenticator as well as your password to login), parental controls if appropriate and so on.