If you are thinking about changing the camera of a smartphone, for example, from 0.5 megapixels to 2 megapixels, bad news.
You can’t do it. The native camera is glued on the motherboard. There are also other factors.
The thing is, smartphones are so cheap that it would be cheaper to just buy a new smartphone than trying to replace the camera.