Yes indeed, I always find it interesting when people who know next to nothing about science take it upon themselves to correct the academy which has had centuries of experience.
Don't take this too seriously either, busterdog. I'm just pushing your buttons the way you love to push ours.
Well anything that absorbs energy gains mass - sunbathers put on weight because their bodies are warmer than when they started.

But in terms of elementary particles:
Energy doesn't spontaneously convert to mass on the scale that we're familiar with simply because most photons have pretty low energy. There is a process called "pair production" that is pretty important in nuclear physics (in fact, it's at the heart of what I'm doing now in my research project - we're measuring the rate of this process in the decay of an excited nuclear state), in which photons annihilate each other to produce a particle-antiparticle pair.
However, photons need to have a minimum energy to actually produce this pair. Firstly they need to have enough energy to convert simultaneously to
both particles in the pair. Secondly, there needs to be enough leftover kinetic energy for both particles to be ejected at a large enough speed away from each other so that they don't just kill each other a few nanoseconds later.
How much energy is this? Well pair-production most often happens with gamma photons producing electron-positron pairs - and the mass of an electron, in energy units, is 511KeVs or thousand electron-volts. So for a single photon to generate an electron-positron pair, it must have about 1MeV. By comparison the strongest X-rays have about 120keV per photon, a tenth of what's needed. Remember we're talking about the radiation that, in the doc's office, slices through your soft tissues without breaking a sweat, unlike infrared or even ultraviolet radiation that dumps all its energy in your skin making you feel all warm. The reason we aren't familiar with energy to mass conversion is simply because it isn't apparent in everyday life.
I was looking up the actual science

and it turns out that "why particles have mass" is a hideous, hideous misunderstanding of what the Higgs boson is supposed to do. Rather, the boson explains why
W and Z bosons have mass, not just electrons and protons and all those.
And right now I'm too lazy to explain further.