We report on our calculation of the interglueball potentials in SU(2), SU(3), and SU(4) lattice Yang-Mills theories using the indirect (so-called HAL QCD) method. We use the cluster decomposition error reduction technique to improve the statistical accuracy of the glueball correlators. After calculating the glueball scattering cross section in SU(2) Yang-Mills theory and combining with the observational data of the dark matter mass distributions, we derive the lower limit on the scale parameter.