Prep phrases in the beginning of a sentence are separated from the independent clause by a comma.
after a long civil war that devastated his native nigeria (prep), the main character in civil peace rebuilds his life.
internal clauses will also be separated with commas when they do not flow logically with the rest of the independent clause.
elie wiesel (ind. clause), recalling his suffering in the nazi concentration camps (int. clause), often spoke out against similar oppression (continued ind. clause).
The bird helps the cow by getting the tick off, and by doing so, it helps the bird as well because the bird gets a snack while doing so. Hope this helps :3