Recent observations discovered the young stellar system in high-z galaxies, including young massive star clusters (YMCs, e.g., Vanzella+22). Previous theoretical studies showed that star cluster formation proceeds under photoionization feedback from massive stars, and it suppresses star formation (e.g., Kim+18). However, the environmental effects on star clusters are still under debate. Especially the strength of feedback depends on metallicity and stellar IMF. We perform the 3D radiation hydrodynamics simulations (RHD) with various metallicity, cloud compactness, and IMF. The YMC formation occurs only in more compact clouds than 300 Msun pc^-2 at Zsun. These threshold values increase with low-metallicity and top-heavy IMFs. In YMC formation, due to strong gravity, photoionization feedback cannot evaporate the ambient gas around the star cluster. Therefore, massive and compact star clusters are born, and the star formation efficiency increases to >30%.