The measurement of direct photons from Au$+$Au collisions at $\sqrt{s_{_{NN}}}=39$ and 62.4 GeV in the transverse-momentum range $0.4<p_T<3$ Gev/$c$ is presented by the PHENIX collaboration at the Relativistic Heavy Ion Collider. A significant direct-photon yield is observed in both collision systems. A universal scaling is observed when the direct-photon $p_T$ spectra for different center-of-mass energies and for different centrality selections at $\sqrt{s_{_{NN}}}=62.4$ GeV is scaled with $(dN_{\rm ch}/d\eta)^{\alpha}$ for $\alpha=1.21{\pm}0.04$. This scaling also holds true for direct-photon spectra from Au$+$Au collisions at $\sqrt{s_{_{NN}}}=200$ GeV measured earlier by PHENIX, as well as the spectra from Pb$+$Pb at $\sqrt{s_{_{NN}}}=2760$ GeV published by ALICE. The scaling power $\alpha$ seems to be independent of $p_T$, center of mass energy, and collision centrality. The spectra from different collision energies have a similar shape up to $p_T$ of 2 GeV/$c$. The spectra have a local inverse slope $T_{\rm eff}$ increasing with $p_T$ of $0.174\pm0.018$ GeV/$c$ in the range $0.4<p_T<1.3$ GeV/$c$ and increasing to $0.289\pm0.024$ GeV/$c$ for $0.9<p_T<2.1$ GeV/$c$. The observed similarity of low-$p_T$ direct-photon production from $\sqrt{s_{_{NN}}}= 39$ to 2760 GeV suggests a common source of direct photons for the different collision energies and event centrality selections, and suggests a comparable space-time evolution of direct-photon emission.