CNET has made a nice comparison of the cameras on Samsung’s $ 400 Apple phones. Both are good, but for video and details when magnified, the iPhone SE wins.
The iPhone can also film in 4K / 60fps, while the A51 can only film in 4K / 30. The autofocus on the Galaxy A51 is not as smooth as on the iPhone SE … These two $ 400 phones have capable cameras that defy the retail price. The Galaxy offers more flexibility if you want to be able to switch between different scenarios, like using the ultra-wide or the macro. But the iPhone has more powerful video recording and, in some cases, the camera captures more detail at maximum magnification.
Check it out: IPhone SE camera vs Galaxy A51 camera