Can you use a bonus action between the seperate attacks of a spell


Similar to my recent question about moving between a spell’s attacks I am curious about whether RAW you can use a bonus action between a spells attacks.

Unlike in the case of Movement, Bonus Actions do not have a section specifying that they can occur in between parts of a particular type of Action. The section on Bonus Actions reads

You choose when to take a bonus action during your turn, unless the bonus action’s timing is specified (PHB, 189)

The answer to this question is very relevant to Warlocks who might use Eldritch Blast against the target of their Hex but slay the target before every blast of Eldritch Blast has been used. The Warlock would then want to target a new creature with the remaining blasts (see this answer on changing targets during a spell) but first use their Bonus Action to move Hex to the new target.

Related: Can you use a bonus action from Cunning Action in the middle of an Attack action?