The cell membrane is also selectively permeable, i.e. they allow only certain types of molecules to enter & leave the cell.
It is also an important aspect to maintain the integrity of the cell.
The permeability of the molecules across the cell membrane depends on the polarity, charge, and size of the molecules.
Neutral molecules can also pass by cell membrane without requiring energy by passive transport, whereas polar molecules cannot cross nonpolar lipid bilayer & requires carrier proteins for their transport, i.e. facilitated transport.
Size of the molecules: For small size molecules, movement will be faster.
Solubility: Molecules that are generally fat-soluble can cross the membrane faster.