This used to be a heated debate for me until I realized that most people don't know the facts. I have had many iPhones but I switched to Android (Samsung Galaxy Series) a while back.
I have a few take-aways.
The iPhone is a great phone, it works very well within the Apple ecosystem. If you like ease-of-use and Apple products or if you are not that tech-savvy, I would recommend it 100%. My wife, 3 kids, in-laws, parents, siblings have iPhones and love them.
Android phones, on the other hand, come in so many different flavors. Any of which could leave a bad taste in your mouth. This is because there are so many different manufacturers (Samsung, Google, Motorola, OnePlus, etc.).
Most people like to compare these phones by camera quality, storage space, and general useless features. When it comes down to "flagship phones", they are all so close in specs that the only people that really argue are the fanboys that are biased towards their loves.
Each has their own positives and negatives and I could rant all day about which does which better but when it comes down to it, its not about quality or features its about personal preference. Apple is geared towards simplicity that "just works" while Samsung (Android) is geared towards full-control and freedom.
The 1 major fault of Apple:
Apple doesn't want you to move away from their ecosystem. Apple products do not, and never will, work well cross-platform. The most apparent issue, when discussing smart phones, is the iMessage problem.
I'm not going to go into detail about how iMessage, RCS, MMS, and SMS work but the issue is with Apple refusing to adopt new messaging standards outside of iMessage chat. Apple makes it seem like "Android messaging" is the problem but it is in fact Apple purposely keeping within the ecosystem.
I would consider myself very tech-savvy and I love how much control I have over my Samsung Galaxy S23 Ultra.
I would also consider my brother to be very tech-savvy and he absolutely loves his iPhone 14 Pro Max.
This is scratching the surface and I could write an entire book on the subject but I'm going to step down from the soapbox and just end this rant here.