Galaxy s21 ultra or an iPhone 12 pro max. Both have excellent performance but the samsung has a much better screen and a higher refresh rate along with several software gaming features while the iPhone has a slightly better battery life and a more powerful processor. I would go for the samsung since you are overall getting a better phone and a nicer gaming experience with things like Xbox game pass and stadia. Plus you can side load games and emulators that you can't do on iPhone without jailbreaks.
Tyrick is wrong the iPhone does not have better battery life and it takes forever to charge an iPhone the Galaxy S21 is the best Top flagship phone for gaming and it is the better phone overall other than a gaming phone like the Asus Rog 4