Hello, it is a common problem in Samsung Z 4 Flip.
The problem comes from the intercom Flex replacement. This replacement connects the main board with the charging board that is connected to the screen, when opening and closing it so many times it wears out and starts to fail and produces this problem. Here in Argentina we solve it, but many do not do this work and directly tell you to change the entire screen