Your issue is the poor hand-holdability of a smartphone combined with a ridiculously small sensor size.
It's darker indoors than what you think. Indoors in typical light, the light level is less than 1/100 of the light level in daylight outdoors. So you need to collect 100 times more of that faint light indoors than outdoors.
One possibility is a fast aperture. Because smartphone cameras have fixed focal length lenses, you can have easily f/1.8 as opposed to f/4. The trouble is, this gives you only 5 times more light than a typical f/4 zoom in a digital SLR or mirrorless camera.
So you need something more. One possibility would be raising the sensor sensitivity. However, small sensors can't be sensitive without having huge amounts of noise. Unfortunately a smartphone camera has 1/38 the area of a full frame camera. So this can't be done: smartphone cameras are 1/38 times as sensitive as full frame cameras.
You could use a flash (Xenon tube flash to be precise). The trouble is, practically no smartphone has a flash. Some Nokia PureView phones did but you can't buy those anymore. Typically the thing called "flash" is a LED light. The trouble is, it helps only in very very dark environments. In typical indoors environments, the LED light won't create a brighter scene than the light that is already there.
So the only remaining possibility is increasing exposure time. That's what your phone is doing indoors. Unfortunately, because the phone doesn't have a proper hand grip like good cameras, but instead is a flat piece, you can't keep it steady. Especially because it lacks a shutter button, you need to touch the touchscreen to take a picture, vibrating the camera phone and thus taking a shaken picture.
The best solution is buying a phone with image stabilized camera. Usually the image stabilizer is so good that more than two thirds of your pictures are very sharp.
Without an image stabilizer, you probably need to take 50 pictures. Maybe if you're very lucky there might be one sharp picture among those 50 pictures.
So it isn't about megapixels. It's about image stabilizers.