Any help to clear up this is appreciated.
Edit: Consolidating all answers and comments, pixel size is but only one factor of image file size. Others being, amount of details, compression, image noise etc. (future readers, read the answers and comments well to get a perspective). Below is an example of two images of same sunflower, shot under same lighting conditions and having same pixel size too (2592 x 3888), but varying ISO setting and shutter speed:
Image 1 - ISO 100, f/5.6, 1/350 s. Size- 2.17 MB
Image 2 - ISO 1600, f/5.6, 1/4000 s. Size- 4.15 MB
Thank you, everyone, for providing great answers and comments.