Could be anything...
Faulty power source going bad - try a different power source
Bad/corroded connection - replace connection
Faulty wiring - try a short premade known good cable
Camera going bad
If camera going thru router then you are probably overloading the router.
Camera is hacked and being used as a bot.
Provide more details like camera make/model, power source,distance to camera, topology of network