Help understanding when to use resistors

The DHT 11 sensor when used alone needs a pull-up resistor. DHT 11 modules (like this one in the pic) use to have a built-in resistor already, so that you won´t need to worry about it.
I suggest you to follow @MarkT tip and look for the specs of your module, just to be sure about it.

If you need some more details and are really interested to know the reasons why, maybe you can get some tips on other posts of the Forum, like this one:
https://forum.arduino.cc/t/why-does-dht11-need-pull-up-resistor/515809

Have fun! :upside_down_face: