I am going to preface my comments and say that I am not an iPhone person at all. My daughter has one, friends and family have them, but I would not buy an apple device as they just don't appeal to me for a number of subjective reasons.
I am comparing the Pixel 4 XL and iPhone 11 Pro Max
1) If your going on hardware alone the iPhone beats out the Pixel 4 XL in a number of areas. It has the wide-angle camera, it has a larger 6.5" screen, larger storage options (256GB & 512GB), and 3969 mah battery to name a few things. The iPhone does appear to only have 4 GB of RAM however.
2) When you look at software that really depends on preferences. The assistant and Android auto are much better than the apple offerings though IMO. SIRI just isn't as good as the google assistant with many things in my experience. Android auto is much better than apple car play. I use my phone as my infotainment software in my vehicle...I could not use Apple Car play after having had Android Auto for years. If you want to see what I am talking about check out some YouTube videos comparing the two.
Now I started out on the iPhone from day one. That was all that was available back then. Android has come a long way over the years and IMO has caught up with Apple....even surpassing it in some areas. So putting my bias toward Android devices aside, putting aside my feelings that Apple devices are overpriced, I would still say the Pixel 4 XL would be a better choice.
With all that said....your device is a personal choice and what works for me and the next guy may not work for you. You should evaluate how you will use the device, look at what specs each device offers, and then make a choice based on your wants and needs.