The main reason for Android's high marketshare globally is because of developing markets where Android phones (typically lower end ones) are typically the only option for a lot of buyers, as a result of their lower incomes. The primary reason for iPhone's significant market share in the United States and Canada is because of our far higher income levels compared to the other continents, making getting an iPhone more reachable. Additionally, iPhone launched sooner than Android-based alternatives did, with it launching in 2007 in the US and July 2008 in Canada. The first Android phone didn't launch until October 2008 and that was just in the United States; the first Android phones didn't come to Canada until May 2009, almost a year after the iPhone 3G was launched in that market. And over time that kind of just ended up tying into people's preferences. Android is dominant outside of the US and Canada, whereas iPhone is dominant inside the US and Canada and that has been the case for basically the entire smartphone era.
If Europe / Asia / Africa all had similar income levels to the US and Canada, it's likely iPhone would be closer in market share to Android in those regions too.
Take this study from Counterpoint Research for example, all of the best selling Android phones are in Samsung's A-series, plus a single Redmi device:
https://counterpointresearch.com/en/insights/global-smartphone-sales-top-10-best-sellers
Android's popularity comes from budget phones, not from flagships. Apple has the flagship smartphone market on lock.