Superconductivity modulated by structural phase transitions in pressurized vanadium-based kagome metals