Is help used to mean the same thing in the next two sentences?

This will help to prevent accidents.

I served him three times, and after that he helped himself.
different meanings