we wraped the wire around it before and the fence worked until the new wire went around the fence and the wire anit working but the box is working though
What new wire? Do you mean when you connected the hot wire?
That's likely the problem. Insufficient ground and drain of power from vegetation.
If the box wasn't connected to the part of the fence to be energized and the ground was wrapped around your stake, it would appear to be working.