Add a trigger, select the light turning on as your target.
The best way to learn is to just try. Run thru the docs on getting started with the automation editor. If you get stuck, come back with what you have done.
You can trigger your Sonoff switch easily using Home Assistant automations.
First, ensure your Prama NVR or camera motion binary sensor is integrated into Home Assistant (via ONVIF or WebRTC).
Then, create a simple automation where the camera’s motion or human detection entity acts as the Trigger, and turning on the Sonoff light entity is the Action.