I purchased the Sigma 18-50mm F2.8 DC DN Contemporary for Sony E and am using it on a Sony a6000. I previously used a Sigma 30 mm prime lens and had no issues. With the new lens I am finding more blurriness at 50 mm than I expected. All the online reviews said that this lens has excellent sharpness at all zoom levels, so I'm trying to figure out if this lens if defective. Here are four photos of a bottle of hand cream shot using the 18-50 lens at 18 mm, 30.1 mm, 50 mm, and a separate Sigma 30 mm prime lens. You can see a considerable loss of sharpness in the 50 mm shot.
All the online reviews said that this lens has excellent sharpness at all zoom levels
Excellent for a zoom at the longest end of its focal length range and excellent for a prime are not necessarily the same thing. Almost all zooms, especially those that start on the fairly wide end of things, are sharpest at their shortest/widest focal lengths. They're usually least sharp at their longest focal length.
From a lensrentals.com blog entry titled 'Painting Zoom Lenses with a Broad Brush – Roger’s Law of Wide Zoom Relativity', Roger Cicala wrote about this very thing a while back. Talking about Wide angle zooms:
At this point, I think, the pattern is pretty clear. For simplicity sake, I think it best we give this pattern a name, and I think the logical name would be “Roger’s Law of Wide Zoom Relativity” since wide zooms are relatively sharper at the wide end. Are there exceptions to this law? Yes, but they are few and far between. For a few of these sets of 9 copies, there’s one lens that’s better at the long end than at the wide end, but for most there are none. No set tested averaged better at the long end than at the wide end.
A little later in the same article he draws the same conclusion about mid-range zooms:
Again, you can see the pattern; standard range zooms tend to resolve better at the wider end, not as well at the telephoto end. I didn’t show them, but 24-105mm and 24-120mm zooms have the same pattern. So the Law of Wide Zoom Relativity seems to hold true for zooms that go from wide to slightly telephoto.
Most primes are also sharper than most zooms, though there are some premium zoom lenses introduced in the last decade, most of which cost upwards of $2,000 USD that are as sharp or almost as sharp as good mid-range priced prime lenses costing one-third as much or less.