"How exactly does energy become mass?"
Can this be answered exactly? There is potential energy, kinetic energy, heat energy, the energy of a particle as a function of wavelength made uncertain by it's bandwidth, gravitational potential energy, static electric potential energy, whatever it is from the weak and strong forces... Can one answer exactly cover them all?
Yes and I might be able to do it in one word: unification! (when we get that far.)
Currently we don't know enough about matter,energy,time,space,etc,..to REALLY answer
the original question(s) ...maybe the unification of relativity and quantum theory will provide that. At the "start" it appears they are all the same entity, and the different forms of energy as well all unified, at the moment of the creation of the universe: call it the big bang or big jump or whatever you want. If we really knew about that we might know more precisely how they are all related.
But that's a tall order as it apparently came from "empty" space, maybe from nothing! a mere quantum fluctuation??
Once that extremely high energy and extremely unstable initially unified state went through inflation and a far more stable, lower energy and more slowly "dying" universe emerged (the one we live in) everything now "looks" different. Yet via mathematics we have been able to unify the strong and weak and electromagnetic forces...only gravity remains "untamed".
Alchemy was the middle ages pseudoscience of converting one material into another...we still don't know how to do that in most cases...A few light elements from the original bang are synthesized by stars to make all elements up to iron...with the collapse of larger stars supernova can then produce nearly all the heavier elements...but we can't do most of that.
and to the OP: don't dismiss string theory because it's mathematics, while largely incomplete, offers tantalizing insights...string theory mathematics can be fabricated to elicit strings (to compose bosons and fermions, etc) and in turn these strings can be formulated to emerge as
space via Penrose Spin Networks...so there are fascinating elements of unification here...not just mass and energy but perhaps space as well!...come to think of it, time may be missing as a basic ingredient in string theory, unlike relativity, which provides some integration.