Here’s a tip. If you are buying a digital camera which is not completely new, point it at a white piece of paper and take a photo. Then look at the result. The photograph will show you if there is any dirt on the sensor or the lens.
I didn’t do this today, which is why I had to take the camera back to the shop……..