Can you get lung cancer from inhaling mold and how much time you need inhale to get cancer. I'm 21 years old. Smoked like 20-30 cigarettes with mold?

Yes. Depending on the type of mold and the amount that was inhaled and the time period, it can be dangerous and toxic, potentially triggering lung cancer. If you develop respiratory symptoms, see your MD. You can get various tests to evaluate for lung disease including CXR, Pulmonary function tests, pulse oximetry, etc, to evaluate different aspects of lung disease.