The discovery of superconducting H3S with a critical temperature Tc∼200 K opened a door to room temperature superconductivity and stimulated further extensive studies of hydrogen-rich compounds stabilized by high pressure. Here, we report a comprehensive study of the yttrium-hydrogen system with the highest predicted Tcs among binary compounds and discuss the contradictions between different theoretical calculations and experimental data. We synthesized yttrium hydrides with the compositions of YH3, YH4, YH6 and YH9 in a diamond anvil cell and studied their crystal structures, electrical and magnetic transport properties, and isotopic effects. We found superconductivity in the Im-3m YH6 and P63/mmc YH9 phases with maximal Tcs of ∼220 K at 183 GPa and ∼243 K at 201 GPa, respectively. Fm-3m YH10 with the highest predicted Tc > 300 K was not observed in our experiments, and instead, YH9 was found to be the hydrogen-richest yttrium hydride in the studied pressure and temperature range up to record 410 GPa and 2250 K.