Again, I reiterate, because this is important!
For nice sharp photos on your modern 8K UHD DSLR camera, use a prime lens. In particular, use a prime lens with a focal length longer than your camera mount’s flange distance. If the focal length is shorter than the flange distance, then that means that the lens will have extra optical surfaces inside to compensate by means of a “reverse projection,” even if it is a prime lens. Thus, longer focal length prime lenses guarantee that the lens is as optically simple as possible, and therefore will provide the best possible photographic quality, especially in terms of sharpness.
Next least ideal is prime lenses of shorter focal lengths.
Least ideal are zoom lenses and macro-zoom lenses.
More optical surfaces mean more places for image quality to degrade, and more places that need to be anti-reflective coated to compensate.
Is there any purpose, then, for using the lenses with less ideal optics on a DSLR camera? Why not just use a smartphone or point-and-shoot in that case? Well, as it turns out, the larger apertures and larger, higher-resolution sensor still do provide advantages over the cheap cameras. Particularly, even though you won’t get better resolution, you will be able to get lower noise floors than the cheap cameras… which does amount to better practical resolution, even if by pixel dimensions there would otherwise be no improvement.