"Better" is a highly subjective term.
But lenses can do things that postprocessing can't do, strictly speaking (though it can often emulate well enough to fool most people).
The input to a lens is a field of photons that are:
1. Striking the sensor at different places. In other words, which pixel they hit.
2. Coming into the sensor at different directions.
3. Coming in at different wavelengths.
The 2D image captured by a sensor completely discards 2 and it drops a significant amount of information from 3 on the floor by bucketing all wavelengths into red, green, and blue amplitudes designed to mostly mimic human visual perception.
Lenses have access to the whole shebang.