First, the key difference here is that ’earlier’ is a comparative form of the adjective ’early’. Just like superlatives (such as ‘earliest’), comparatives always perform a comparison, but unlike superlatives they must always have a point of reference for comparison (though the point of reference does not need to be in the same sentence).
As far as the actual meanings, I’m going to cover ’early in July’ first because it’s simpler.
‘early in July’ is an adverbial phrase. It specifically states that the verb it’s modifying (in this case ‘quit’) occurred at a point in time near the beginning of the month of July. It makes no statement about the current time, though the use of the simple past tense ‘quit’ indicates that the event has already happened.
‘earlier in July’ is also an adverbial phrase, but the use of a comparative form means that it’s indicating some secondary point of reference. In this case, there is missing context as to what that point of reference is, though normally it would have been in a previous sentence in the same conversation. This is an interesting case also because adding a comma between ‘earlier’ and ‘in July’ actually changes the meaning. As written in your example without a comma, it implies that the point of reference being used for the comparison is also some point in time in the month of July. With a comma though (‘earlier, in July’), it implies that the earlier point in time was in the month of July, but not that the point of reference being compared to was a point in time in the month of July. Just like ‘early in July’ though, the use of the simple past tense ‘quit’ indicates that the event already happened (and indirectly implies that the point in time being used for the comparison is in the past as well, though not as strongly as use of the past perfect tense ‘had quit’ would imply).