Head to Apple menu > System Preferences > Apple ID, find the Photos app, then untick the checkbox next to it. Enter the password when prompts.