The scientist you're likely thinking of is
Robert Hooke. He was looking at a thin slice of
cork under a microscope when he saw small, box-like compartments. These reminded him of the small rooms that monks lived in, called
cells, and so he gave these compartments the same name.
It's important to note that what Hooke saw were actually the dead cell walls of the cork, not living cells. But his discovery was a crucial step in understanding the fundamental building blocks of living organisms.