What is the meaning of the word "thereby"?

Definitions:

  1. by that means or because of that copy to clipboard adverb
    • The red wine was spilled, thereby ruining the table cloth. copy to clipboard