The red light only means that the sensor module is getting power.
There are a number of libraries for the DHT-11 sensor. The are not alike and code for one may not work with another. Only trust example code from the library that you have installed. Don't install multiple libraries with the same name.
You have not provided much information that we can use to help you. We usually need at least the code that you are having trouble with, a schematic or wiring diagram and technical data (data sheets) for components.
A diagram or schematic that is hand drawn, photographed and posted is fine. Include all pin names/numbers, components, their part numbers and/or values and power supplies.
You seem to change randomly to a different hardware without really describing it in your postings
What should I think about you? I have no idea what is the truth.
The only thing that is clear is that you do not take advice on how to communicate effectively .
Possible explanations for such a behaviour
beeing lazy in what info to post = un-intententioal trolling
At this point and I believe I saw mention of this earlier, add a 4.7 K Ohm resistor between your Data Out and Vcc. Some sensor boards include the 4.7 K pullup and some don't. Leave your code as is for the DHT 11 change made earlier.