I ran into this issue this morning setting up my new work laptop, 16 inch M1 MBPro. I have two Samsung S32D850 Monitors. The flickering happened on one and not the other. I tried switching out all the components from HDMI cables to USB-C adapters to my Macbook Air and concluded that the issue was the monitor itself. So I swapped it with my co-worker's monitor, same make and model(S32D850), and it's working fine. Note that it the monitor was working fine when I was using my Macbook Air.