Neither is better. They are different. Android is a more open platform, allowing you to run applications from outside the app store. The file system is also open-- meaning you can plug it into any computer and it will act like a USB drive or external hard drive. While this openness creates choice in the market and drives innovation, it comes at a cost, which is optimization and security.
Since many different hardware manufacturers make Android phones (summed, more than iPhones), the software landscape is extremely fragmented, with multiple versions of Android, running multiple OEM skins, on multiple devices. Compare that to Apple, which is entirely vertically integrated-- they design the chipset, hardware, software, everything. iOS is extremely optimized for their A series chipset (which, by the way, utterly destroy the Qualcomm chips used in Androids). Fragmentation mean vulnerabilities are harder to patch and easier to exploit.
On security, Apple wins, with no caveats. Every current generation iPhone is hardware encrypted by default, while less than 10% of Android phones are secure.
On voice recognition, Google's Assistant is significantly better than Siri.
iOS still doesn't have homescreen widgets!
It's worth pointing out price difference-- you pay a premium for an iPhone. Google's Pixel phones are similarly expensive, but there is an entire world of cheaper Android phones to choose from.
At the end of the day, most of the differences between platforms have disappeared. In their UI and UX they are highly similar. I choose Android for its modularity, choice of hardware, homescreen widgets, and better voice recognition.