A cell is like a factory in many ways.
For one, the cell typically contains many organelles that have several varying functions. In a factory, you have many workers who perform different tasks, just as the organelles in the cell do.
Another reason is that cells contain a nucleus or the boss/brain of the cell. In factories, this could be considered the boss of the workplace that tells each and every worker, or organelle, what to do.
The selectively permeable membrane of a cell also resembles a factory as it only lets in workers or special guests. The cell's membrane only lets in specific materials, hence the selectively permeable membrane.
These are just a few ways as to how the cell is like a factory.
Hope this helps!