Say Cheese And Die! by R. L. Stine

Four friends find a hidden camera in a deserted house and discover that every photo it takes predicts a disturbing mishap, then makes it happen. As the snapshots come true—injuries, disappearances, and escalating danger—they race to get rid of the camera and unravel its origin while being stalked by a mysterious drifter who wants it back. Their attempts to outwit the device only deepen the curse, ending with a chilling twist that suggests some nightmares refuse to stay out of the picture.

Purchase from Bookshop.org