A photoresistor is an electronic component designed to measure light intensity. It is a type of resistor whose value varies depending on the amount of light it receives.
The photoresistor is commonly used in projects involving light detection, such as a darkness detector, which could turn on an LED when a certain light threshold is reached, or in a solar tracker to optimize the orientation of photovoltaic panels.
Other types of sensors can also detect light and convert it into electrical signals, such as the photodiode or phototransistor.
Here is the schematic on Raspberry Pi Pico to make the photoresistor work: