Heating can work in principle. At high enough temperatures and pressures, such as in supernova explosions, heavy elements can be formed. It’s just that such extremely high temperatures and pressures are near impossible to produce. To confine matter, plasma, at such temperatures incredibly high pressures are needed. No ordinary matter camcan be used for such containment. Magnetic fields have to do the job. This is the challenge faced by energy production with nuclear fusion.