How does bacteria affect a cell?

Bacteria don't live in cells, reed.

That's mycoplasma and chlamydia.

Bacteria mainly affect organisms through their own secondary metabolites.

For example, secreted protein is sometimes toxic to some organisms.

These protein will have an effect on cells.