I have the same model as yours and I was having the same issue of black horizontal lines appear after using the MacBook after some time and now I’m no longer having this issue. The only thing I did is buying a laptop stand which make the laptop above the surface to offer greater ventilation and more airflow. Also let your MacBook rest for at least 5 days. Though I longer have this issue right now, my MacBook has developed a stage light effect on the screen which is related to the flex cable that connect the display to logic board and famously know as FLEXGATE problem. Apple never ceases to amaze me!
I’m having this issue on my 2017 fn keys. I’m suffering this issue for months and Apple are not admitting that is a design flaw. A test you can do to see your device is defected with this issue. Use your MBP for a time then put a solid grey background on your screen and check if you can see a dark lines on your screen