I just bought a new pc build and a monitor few days ago and these are the specs:
OS: Windows 10 Pro 64bit
CPU: Ryzen 3 3100
Mobo: Asus Prime B450M-K
GPU: Asus Dual evo RX 5500 XT OC 8GB
RAM: Hyperx fury 1x8 GB 3200 mhz
PSU: Cougar VTC 500w 80+
Monitor: Asus VA24EHE eyecare 75hz IPS 1080p 5ms freesync
(monitor is connected to the gpu with an hdmi cable)
So, I turn on my pc, open valorant or any steam game, and screen keeps going black for 3-4 secs then it goes away for 2 secs or something then it goes black again and so on, same if i open a video file on my pc using windows 10 Movies & TV app or using windows media player, doesnt matter, SO black screens only happen when running a game or a video, IF i restart my pc, open a game or a video again, everything goes fine and no black screens at all, which is really weird.
summary: black screens while gaming or watching vids, gets fixed after restarting my pc.