‘Sensor‘ is a device that detects a change in a physical stimulus and turns it into a signal which can be measured or recorded.
The term sensor is used for an element which generates a signal which is proportional to the quantity being measured.
Examples: Diaphragm, RTD, Thermistor, Thermocouple, etc.

Commonly transducers converts mechanical, thermal, electromagnetic, optical, chemical etc. form of energy to electrical energy.
Transducer provides meaningful/usable information. It’s a sensor with signal conditioning circuits.
Examples: Microphones, Loudspeakers, Thermometers, thermocouples, piezoelectric, photovoltaic cells etc.

ØA solar cell is both a sensor and a transducer, since it responds to a stimulus (produces a current or voltage in response to radiation) and also transduces from the radiant to the electrical domain.
Therefore, all transducers contain a sensor, and many (though not all) sensors are also transducers.