How to stop DC PWM fan with Arduino uno and temperature sensor

It's analogWrite(), not analogueWrite(), and not all Arduino pins are capable of PWM (most boards have marked the ones that can do PWM with a ~ next to the pin designation, or look up the analogWrite() documentation page).