Most likely you’re trying to take too high of a resolution screenshot and the GPU is running out of VRAM