Not the person you’re responding to, but lenses don’t improve image quality. All optics have some defects, and high quality lenses will have fewer of them. But a larger, more expensive lens primarily allows for a wider range of aperture and greater control of depth of field. That does allow for more artistic photographs, but objective image quality does not improve.
If you’re still skeptical, consider a pinhole camera with no lens capturing an image at near infinite focus. Adding a piece of glass that refracts the light can’t perform any better than pure parallel rays of light.
Bigger lenses mean more light. More light means better signal to noise ratio. That's an objective metric of image quality.
Phone cameras can try to compensate for this by taking long exposures - actually videos - and warp the frames into alignment to remove blur, but it's a losing game if there's a lot of motion. Or the camera can try and guess the textures and replace them with similar ones, like the Gigapixel AI and similar services do - but then it's starting to move away from capturing the actual scene.
I mean, most of the photos I take are with my phone, because it's the handiest available camera. I don't think people talking about quality from dedicated cameras are trying to say that they're better than phones as a practical tool for taking everyday photos. But you do lose some quality and computational tricks can't get it all back.
If you’re still skeptical, consider a pinhole camera with no lens capturing an image at near infinite focus. Adding a piece of glass that refracts the light can’t perform any better than pure parallel rays of light.