It comes from use of hex, bestow curse, hold person/monster, and a level 9 scorching ray. It really is quite silly. I can map out the concentration juggling you have to go through if you want.
Actually you can repeat the damage, on the same opponent at least. Bestow Curse and hold person/monster stay on, meaning each attack afterwards only loses a few dice as you are forced to use lower level scorching rays.
Concentration chains don't work. The action of casting a concentration spell cancels the effects of any concentration spells you are maintaining. So before the new effect lands, the old effect is already gone. They don't linger or stack in any way. Hex, Bestow Curse, and Hold P/M are all concentration spells. Their effects end when you cast another concentration spell.
"You lose concentration on a spell if you cast another spell that requires concentration. You can't concentrate on two spells at once." PHB, p. 203.
So your action of casting any of Bestow Curse, Hex, or Hold P/M cancels the effects of the others. You don't get the paralyzed and therefore double damage from Hold P/M plus the +1d8 per attack from Bestow Curse.
Point being, that you can't chain concentration spells like that. You could only paralyzed for double or +1d8 necrotic per attack with that Scorching Ray, not both. Further, neither Hex or Bestow Curse will help you cast Hold as they're all concentration spells. Whichever effect is on the target when you cast the next is canceled. And you're still talking about being within 5 feet of the thing to get the paralyzed auto crit on a hit for double damage.
Best you could do with a Hold
or Curse + Scorching Ray combo is: 40d6 with Hold
or 20d6 + 10d8 with Curse.
But still, you're talking about 40d6 to
one target for a 9th and 5th/3rd vs Meteor Swarm which does 40d6 to
everything in the 160-foot radius blast zones you lay down for one 9th-level slot. There's no comparison.