Chosen Solution
Hey, so I had the same issue on a Macbook pro (M1) where every so often the screen would flicker, black out and show only those exact vertical lines and so I took it in for repair (in warranty, otherwise repair is ~£500-£1000). It seems to have been a hardware issue as when I mirrored the display on a second screen, it worked but only on that screen (I advise you test this too so that you can point the repair person in the right direction as it’s not a common issue, it seems). So the team at Apple replaced the screen and left it running for a few hours - it’s been a few days and so far, no more blacking out and lines. Just to note, the issue I had would sometimes “fix itself” and not show for hours, which is why I left the issue for 2 months before the issue finally became more of a permanent thing. However, first time I sent it to Apple for repairs, they only checked it for a few minutes, couldn’t replicate the issue, then sent it back untouched.
@Mary Cl - Your issue sounds more like a bad display! Along the glass LCD are Metal Oxide contacts which a ribbon cable is attached to this interface is very fragile! That thin film can crack leaving the trace disconnected from the ribbon cable which then leads to the T-CON board. You can also damage the ribbons too, as they wraparound the hinge area. Sometimes during the manufacturing process the bonding between the glass and ribbon is not secure (often called a TAB error). Liquid screen cleaner can also corrode things as well.