Correct usage of comma- Specific sentence [closed]

The comma is placed appropriately in example 1. The clause "I try my best to dispel hate" is obviously modified by the which (relative) clause that follows it.

However, note that the which clause is a non-restrictive clause and also a modifier. As a conventional rule, modifiers certainly need to be very close to the ideas they modify, which is properly done in example 1. As in your first example, the which (relative) clause is placed correctly, modifying the clause that precedes it. Since it is non-restrictive (non-essential to the sentence's meaning), it is set apart from the clause it modifies by the comma.

The sentence could stand alone without the relative clause, but what the relative clause does here is to add supplementary information to the antecedent action, telling us the relationship between what he isn't good at and what the other person is good at.

The example 1, as written, means he doesn't have a choice and tried to dispel hate--which he isn't good at--while acknowledging the other person's proficiency in dispelling hate.