The Samsung Galaxy S21 and the iPhone 12 are similarly priced, though the Samsung Galaxy S21 is more recent and costs less (at retail price). Other than that, they're both fairly equal as far as fast processors, great cameras, decent battery life and slick design.
Of course, what really matters is whether you're familiar, and used to, either the iOS or Android operating system. Both have their benefits, but this will be the number 1 factor is decision making. Have a look at the best iPhone 12 deals available now for further context.