Display glitches on a MBPro 15 inch Late 2013 (base model) (video)
Solution 1:
You may have one of the Macbook Pros with an acknowledged video issue - unfortunately the free repair program ended long ago. Apple used to have a page where you could check if your model was affected, but it is long gone.
There's some info on https://www.macworld.co.uk/feature/macbook-problems-recalls-3699153/
A 2013 model is probably not worth paying to repair these days. The product is listed as Vintage, so Apple would probably repair it, but at cost.
There's a list of Vintage & Obsolete Macs here - Obtaining service for your Apple product after an expired warranty
You could try running hardware diagnostics - Hold D at boot - & see what is reported.