You have a Red, Black and White at the Photocell.........
The photocell is a switch......it makes/breaks the current on the BLACK wire.........the photocell also is a powered-switch so it requires a Neutral(white)
So....Connect all three White (Neutral) wires together
Connect the House-Black to the Photocell-Black
Connect the Lamp-Black to the Photocell-Red
"...measure once.....cut twice....throw that one away and cut a new one...."