iPhone provides the best security
whenever companies make an app for android then companies submit the apps to google and google makes an analysis of the app and also checks the security of the app then publish it in the play store but the procedure is totally different from apple. Apple rules and regulations are very strict it difficult for app makers to release apps in the App store. if causes any problem in performing it will be directly removed app store.
users of iPhone can’t install 3rd party apps directly, they need to jailbreak the device also it is not easy to do jailbreak. apple provide strong with hardware also however in android components are made by different companies and operating system by Google. All the components and operating systems are made by a single company.
Apple A-series processors which can be seen in iPhone and iPad have a special space called a secure enclave. the secure enclave is used to store the face id and touch id of users. sensitive information of the user is stored in the phone in encrypted form which can not be accessed by other persons and also the secure boot is used whenever phone boots it checks data to avoid corruption. Apple T2 processor in mac books does the same tasks.
Apple is strict in terms of privacy. In iphones users sign with apple id in third party in apps.
samsung is also trying to provide best services to its users but it can not as same as apple.