The Photo Academy:
https://thephotoacademy.com/en/magazine/how-do-different-lenses-affect-the-photo-quality#:~:text=You%20can%20look%20at%20the,megapixels%20in%20today's%20digital%20cameras.
(quote): What affects photo quality more - lens or camera body?
Your lens completely affects the quality of your camera images. It is the device that creates the image. You can look at the camera body for things like potential resolution, potential color depth, and image noise, but a camera, at best, can only record a very close image created by the lens. Lens quality is more important than ever because of the ever-increasing number of megapixels in today's digital cameras. Often the resolution of digital photos is limited by the camera lens rather than the resolution of the camera itself.
Everyone is probably familiar with the concept of image resolution, but unfortunately, it is often given too much attention. Resolution only describes the amount of detail a lens can capture, but not necessarily the quality of the captured detail. Other factors therefore often contribute much more to our perception of the quality and sharpness of a digital image. Therefore, for two lenses with the same resolution, the apparent image quality will be determined primarily by how well each retains contrast, with these lines becoming increasingly narrow. However, in order to make a fair comparison between lenses, we need to find a way to quantify this loss of image quality. A camera lens has a greater influence on picture quality than the number of megapixels, for example, because it directly affects background blur, sharpness, level of detail, and depth of field - to name just a few of the more important parameters.
Using a better lens than the standard one supplied with most cameras almost always results in a significant improvement in quality. A large part of the technical quality of an image is determined by the lens, the only exception being the sensor and the way the camera processes the images. The number of megapixels in a camera is determined by the resolution of the camera's sensor, which is part of the camera body. The quality of digital photos depends on four main factors: The quality of the recording device (camera lens and sensor, and scanner sensor), the size (in pixels) of the digital image, and the digital format in which it is stored (lossless or lossy compression).
The lenses and sharpness of your camera are also important factors in understanding sharpness in photography. If the lens you choose is not sharp enough, the final image may not be as sharp as it could be, and you may not get the most out of your camera's megapixels. Image resolution determines the size at which you can get high-quality prints. As a rule of thumb, you should aim for 300 pixels per linear inch. For on-screen photos, you need very few pixels. Resolution affects the size of your digital photos, but not image quality. Photography is all about painting with light. Lenses are the tools you use to bend light, and an image can only contain as much detail and light as the lens allows. Generally speaking, the best lens always produces the best images, regardless of the number of megapixels." (end quote)
Cheers and best to you.
. (