Here is your problem:
Pin 10 does not have ADC capabilities on the Nano 33 BLE, so you can't use it with the analogRead function. The pins that have ADC capabilities are the ones prefixed with an "A", as marked on the bottom of the board or on the pinout provided on the documentation page: