Gravitational Potential Energy is stored by raising the bucket, this energy is released creating a time varying torque, proportional to the vertical component of gravity acting on the bucket, which is transferred through the lever arm to the tip with mechanical advantage
The tip on a trebuchet is also often attached with a non-rigid sling which actually contains the stone or whatever is being thrown and makes the system much more difficult to deal with as splitting the system up into lever arm and sling would require that the sling be attached to a non-inertial coordinate frame.
Newton's "three laws" are generally inapplicable to a trebuchet because the rotary acceleration is a function of time (i.e. non-constant which is a requirement for those three laws and their rotational counterparts) and a trebuchet also cannot be dealt with by the same small-angle approximation that allows a pendulum to be dealt with succinctly because the buckets often go through large arcs.