What do smartphone manufacturers do differently with their cameras than the Raspberry Pi module camera
I'd say the difference is 20% due to hardware and 80% due to software.

The hardware side


The smartphone probably has better optics and wider aperture;
The smartphone has focusing. The Pi has fixed focus (so it's only good for objects more than 1m away, see hyperfocal distance). But that means that most objects, especially the close ones, are somewhat blurrier than what they would be if there were proper focusing;
The smartphone has a bigger sensor, meaning better signal-to-noise ratio.


The software side

This is the big one. Just look at any video explaning RAW processing. Keep in mind that the one you see on the left ("before") is not even 100% unprocessed - it already has demosaicing and toning curve and some close to correct white balance. What the sensor actually "sees" is even more unconvincing.

This post-processing is a lot of work, and the smartphone does all that mostly automatically, using a combination of fixed algorithms, some environment detection (e.g. - detect faces in the image - use skin smoothing filters), and probably neural networks these days. And the firmware is frequently updated, so it is state of the art.

Digital photography is a complicated thing, and it's enough if your software is even a little wrong about some parameter to turn you image quality into crap. E.g. slightly inaccurate white balance is enough to make the picture thoroughly unconvincing.

The other stuff

How are you comparing the two? Is it on the same display? Because I used to own an iPhone, whose photos looked gorgeous on its screen, but weren't at all that impressive when transferred to a PC and viewed on its otherwise pretty good monitor. Smartphone manufacturers try hard to make their camera + display combo work well, so they are well tuned to each other.