You find reviews and look at the camera notes and examples.
Here we don't look at the Huawei due to spyware beyond what you get in a Google phone. Google's phone is also more likely to be kept current on the OS for longer.
I am looking to buy a smartphone to replace my now useless iPod Touch but I want to buy one with a great camera. My budget is a bit limited so can't go latest generations. I was between the Pixel 1st generation and Huawei P20 lite. What do you reckon is best? Needs to be able to play music (but all of them do, don't they?!)