How can I fix black vertical lines appearing on my monitor?

If there are black vertical lines on monitor screens, it may be a hardware or connection problem. Inspect display cable and tighten as necessary. Use another cable or input port to eliminate connectivity issues. Keeping your graphics driver up to date and using another device with the monitor will also help you to find the root cause. If there are still lines after connecting the device, it may be a problem with the display panel of the monitor and will need professional repair or replacement.

For more: https://devicefixes.com/blog/pc-screen-lines/