Smoking is discouraged while wearing aligners because it is possible for the aligners to become stained or discoloured. The same way your teeth would stain from smoking.
Smoking can also cause other dental issues such as the the effect it has on gums because smoking causes a lack of oxygen in the bloodstream, so the infected gums don’t heal.
Smoking causes people to have more dental plaque and causes gum disease to get worse more quickly than in non-smokers.
Vaping, however, will cause less staining than smoking tobacco.