One of the enduring puzzles in high energy particle physics is why quarks do not exist independently despite their existence inside the hadron as quarks have never been found in isolation. This problem may be solved by formulating a QCD potential for the entire range of interaction distances of the quarks. The mystery could be related to the fundamental origin of the mass of elementary particles despite the success of the quantum field theories to the highest level of accuracy. The renormalization program is an essential part of the calculation of the scattering amplitudes, where the infinities of the calculated masses of the elementary particles are subtracted for the progressive calculation of the higher-order perturbative terms. The mathematical structure of the mass term from quantum field theories expressed in the form of infinities suggests that there may exist a finite dynamical mass in the limit when the input mass parameter approaches zero. The Lagrangian recovers symmetry at the same time as the input mass becomes zero, whereas the self-energy diagrams acquire a finite dynamical mass in the 4-dimensional space when the dimensional regularization method of renormalization is utilized. We report a new finding that using the mathematical expression of the self-energy(mass) for photons and gluons calculated from this method, the complex form of the QCD and QED interaction potentials can be obtained by replacing the fixed interaction mediating particle’s mass and coupling constants in Yukawa potential with the scale-dependent running coupling constant and the corresponding dynamical mass. The derived QCD QED potentials predict the behavior of the related elementary particles exactly as verified by experimental observation.