If you are using the DHT11 from Elegoo its pinouts are different from those you might see. Check the wiring. on mine Vcc is the middle pin.