Webcam flickering (horizontal bands scrolling across the image) is caused by a mismatch between your camera's exposure time and the frequency of artificial lighting. Fluorescent lights and some LEDs pulse at 50Hz (Europe, Asia) or 60Hz (Americas). To fix it, change your webcam's anti-flicker setting: if you're in a 50Hz power region, set it to 50Hz; for 60Hz regions, set it to 60Hz. In Logitech cameras, open Logitech Tune or Camera Settings and look for PowerLine Frequency or Anti-Flicker. In Windows Camera app settings, check for a flicker reduction option. If your webcam software doesn't expose this setting, try changing the exposure time manually — a longer exposure often reduces flicker. Moving to a room with natural daylight eliminates the issue entirely since sunlight doesn't flicker.
Sources