What sensor do I use to measure the intensity of direct sunlight?
You can use a photo resistor. It is also known as an  LDR (Light dependent resistors) and here is a great tutorial to do just that. You can also find a conversion from the 8-bit analog value to lumens if you wish. Here is a tutorial:
https://www.instructables.com/id/Measuring-Light-Using-Light-Sensor/
You can also use a LUX which is the advanced version of a LDR. Here is a tutorial:
https://www.instructables.com/id/How-to-Measure-LUX-With-Arduino/