Water exhibits fascinating structural and electronic properties, with significant implications for condensed matter physics. This study explores the hydrogen bond network in ice XIII and the structural transitions in hydrogen hydrate under pressure using first-principles methods. Oxygen K-edge X-ray absorption spectroscopy (XAS) investigates the local structure of ice phases, revealing strong sensitivity to hydrogen bonding. First-principles molecular dynamics (FPMD) simulations demonstrate pressure-induced phase transitions in hydrogen hydrate. These findings contribute to understanding hydrogen bonding and phase transitions in water-related systems, with potential applications in planetary science and hydrogen storage.