The wording is ambiguous, the DM just needs to make a ruling and be consistent.
Potent Cantrips says:
The sidekick can add its spellcasting ability modifier to the damage it deals with any cantrip.
The trouble here is the phrase "the damage it deals". It is unclear what is meant by this phrase, as it can reasonably mean one of the following things:
- Each time the cantrip deals damage
- the total damage dealt by one casting of the cantrip
Eldritch Blast unambiguously deals damage once for each beam thrown, so it is reasonable to call each instance of a beam dealing damage as "the damage it deals", but at the same time, it makes sense to say that the sum total of the damage dealt by all the beams is "the damage it deals".
But this confusion is obviously why you're here. We cannot nail down a ruling here as the rules are just ambiguous. So the next best thing I can give you how to handle making a ruling on your own.
The most important thing is to just be consistent. Make your ruling and stick to it. It can get frustrating when a DM makes contradictory rulings about the same feature, so we just need to be consistent in how we rule this one at the table. Now, being consistent does not mean the ruling should never be changed. Suppose you rule that you add the modifier to every beam, and it turns out that the ability seems more powerful than it should be, consider changing the ruling (and involve the player in the discussion). Similarly, if only adding the modifier once is too underwhelming, consider changing the ruling. Either way, just be consistent once you have decided what the ruling will be.
If you care, Jeremy Crawford did offer his unofficial ruling on a feature with the same wording, the Arcana Cleric's Potent Spellcasting feature:
Starting at 8th level, you add your Wisdom modifier to the damage you deal with any cleric cantrip.
When asked how this interacts with green-flame blade, JC responded:
Potent Spellcasting adds to dmg. dealt by a cantrip. GFB: add to 2nd target, then to both targets at 5th lvl.
So JC says you add the modifier to each instance of damage dealt by the cantrip. Again, Jeremy Crawford's twitter rulings are not official rulings.