I can't see the video, but if what you describe is correct and the handball was accidental but led to a goal scoring opportunity or a goal, the caution is not correct.
If the handball was deemed to be deliberate and led directly to the goal, then yes, the caution is correct.
The caution is NOT...