Just a guess but possibly a problem with the cable linking the screen to the body of the computer. Probably a simple (but not DIY unless you're feeling brave) fix. Check on iFixIt to see what's involved to see if it's worth going down that route before taking it to Apple.
😞 Seems it may be the cable then. I'd go for a professional diagnosis i.e. Apple. It may be a known fault with a F.O.C. repair (don't hold your breath!) or they can tell you how much it will be and you can decide to go for it or put the money towards a replacement, keeping the old as a spare.